Function at 0x5107af78
Capabilities:
Copy file
Create process on windows
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x12
push 0
push 0
dec ecx
jne 0x5107af80
push ebx
push esi
push edi
mov eax, 0x5107ad60
call fcn.51006a7c
xor eax, eax
push ebp
push 0x5107b7dd
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x5107d9a4]
mov eax, dword [eax]
call fcn.51003750
lea edx, [ebp - 0x14]
mov eax, 2
call fcn.51002ac4
mov ecx, dword [ebp - 0x14]
mov dl, 1
mov eax, dword [0x51060fb8]
call fcn.51061490
mov edx, dword [0x5107d9a4]
mov dword [edx], eax
mov eax, dword [0x5107d9a4]
mov eax, dword [eax]
mov byte [eax + 0x20a8], 0
xor eax, eax
push ebp
push 0x5107b76e
push dword fs:[eax]
mov dword fs:[eax], esp
mov ecx, dword [0x5107d928]
mov ecx, dword [ecx]
mov dl, 1
mov eax, dword [0x51078b30]
call fcn.51037298
mov edx, dword [0x5107d814]
mov dword [edx], eax
lea edx, [ebp - 0x18]
mov eax, 1
call fcn.51002ac4
mov eax, dword [ebp - 0x18]
mov edx, 0x5107b7f4
call fcn.5100493c
je 0x5107b042
lea edx, [ebp - 0x1c]
mov eax, 1
call fcn.51002ac4
mov eax, dword [ebp - 0x1c]
mov edx, 0x5107b810
call fcn.5100493c
jne 0x5107b04b
mov byte [0x5107f060], 1
jmp 0x5107b099
lea edx, [ebp - 0x20]
mov eax, 1
call fcn.51002ac4
mov eax, dword [ebp - 0x20]
mov edx, 0x5107b820
call fcn.5100493c
je 0x5107b083
lea edx, [ebp - 0x24]
mov eax, 1
call fcn.51002ac4
mov eax, dword [ebp - 0x24]
mov edx, 0x5107b838
call fcn.5100493c
jne 0x5107b08c
mov byte [0x5107f060], 0
jmp 0x5107b099
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5107b7b4
cmp byte [0x5107f060], 0
je 0x5107b0c0
lea eax, [ebp - 0x28]
call fcn.51079a4c
mov edx, dword [ebp - 0x28]
mov eax, dword [0x5107d814]
mov eax, dword [eax]
add eax, 0x33c
call fcn.51004594
jmp 0x5107b0dc
lea eax, [ebp - 0x2c]
call fcn.5107a838
mov edx, dword [ebp - 0x2c]
mov eax, dword [0x5107d814]
mov eax, dword [eax]
add eax, 0x33c
call fcn.51004594
call fcn.5107908c
test al, al
jne 0x5107b0fe
mov eax, dword [0x5107d928]
mov eax, dword [eax]
call fcn.5103eb0c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5107b7b4
mov eax, dword [0x5107d814]
mov eax, dword [eax]
mov edx, dword [eax + 0x33c]
mov eax, 0x5107f04c
mov ecx, 0x5107b848
call fcn.51004844
mov eax, dword [0x5107f04c]
call fcn.51008cc0
test al, al
je 0x5107b154
xor eax, eax
push ebp
push 0x5107b14a
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x5107f04c]
call fcn.5107a71c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5107b154
cmp byte [0x5107f060], 0
je 0x5107b187
mov eax, dword [0x5107d814]
mov eax, dword [eax]
mov edx, 0x5107b85c
call fcn.51044dac
mov eax, dword [0x5107d814]
mov eax, dword [eax]
mov eax, dword [eax + 0x318]
mov edx, 0x5107b87c
call fcn.51044dac
jmp 0x5107b1af
mov eax, dword [0x5107d814]
mov eax, dword [eax]
mov edx, 0x5107b89c
call fcn.51044dac
mov eax, dword [0x5107d814]
mov eax, dword [eax]
mov eax, dword [eax + 0x318]
mov edx, 0x5107b8bc
call fcn.51044dac
mov eax, dword [0x5107d814]
mov eax, dword [eax]
mov dl, byte [0x5107f060]
mov byte [eax + 0x338], dl
cmp byte [0x5107f060], 0
je 0x5107b320
push 0
mov eax, dword [0x5107d814]
mov eax, dword [eax]
mov edx, dword [eax + 0x33c]
lea eax, [ebp - 0x30]
mov ecx, 0x5107b8dc
call fcn.51004844
mov eax, dword [ebp - 0x30]
call fcn.510049f0
push eax
lea edx, [ebp - 0x34]
xor eax, eax
call fcn.51002ac4
mov eax, dword [ebp - 0x34]
call fcn.510049f0
push eax
call sub.kernel32.dll_CopyFileA
test eax, eax
jne 0x5107b248
push 0x5107b8f0
mov eax, dword [0x5107d814]
mov eax, dword [eax]
push dword [eax + 0x33c]
push 0x5107b8dc
lea eax, [ebp - 0x38]
mov edx, 3
call fcn.510048b8
mov ecx, dword [ebp - 0x38]
mov dl, 1
mov eax, dword [0x51007aec]
call fcn.5100c314
call fcn.51003f1c
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov eax, dword [0x5107d814]
mov eax, dword [eax]
mov edx, dword [eax + 0x33c]
lea eax, [ebp - 0x3c]
mov ecx, 0x5107b91c
call fcn.51004844
mov eax, dword [ebp - 0x3c]
call fcn.510049f0
push eax
call sub.kernel32.dll_CreateFileA_1
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x5107b29f
mov ecx, 0x5107b92c
mov dl, 1
mov eax, dword [0x51007aec]
call fcn.5100c314
call fcn.51003f1c
push 0
push 0x5107f064
lea edx, [ebp - 0x40]
mov eax, 2
call fcn.51002ac4
mov eax, dword [ebp - 0x40]
call fcn.510047f8
push eax
lea edx, [ebp - 0x44]
mov eax, 2
call fcn.51002ac4
mov eax, dword [ebp - 0x44]
call fcn.510049f0
push eax
push ebx
call sub.kernel32.dll_WriteFile_1
lea edx, [ebp - 0x48]
mov eax, 2
call fcn.51002ac4
mov eax, dword [ebp - 0x48]
call fcn.510047f8
cdq
push edx
push eax
mov eax, dword [0x5107f064]
xor edx, edx
cmp edx, dword [esp + 4]
jne 0x5107b300
cmp eax, dword [esp]
pop edx
pop eax
je 0x5107b31a
mov ecx, 0x5107b93c
mov dl, 1
mov eax, dword [0x51007aec]
call fcn.5100c314
call fcn.51003f1c
push ebx
call sub.kernel32.dll_CloseHandle_1
mov dl, 1
mov eax, dword [0x51018a5c]
call fcn.51003720
mov ebx, eax
mov eax, dword [0x5107d9a4]
mov eax, dword [eax]
mov edx, 0x5107b94c
call fcn.5106196c
mov edx, eax
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x6c]
lea edx, [ebp - 0x4c]
mov eax, 3
call fcn.51002ac4
mov eax, dword [ebp - 0x4c]
push eax
lea edx, [ebp - 0x50]
mov eax, 4
call fcn.51002ac4
mov eax, dword [ebp - 0x50]
push eax
mov eax, dword [0x5107d814]
mov eax, dword [eax]
mov eax, dword [eax + 0x33c]
push eax
push 1
lea edx, [ebp - 0x54]
mov eax, 2
call fcn.51002ac4
mov ecx, dword [ebp - 0x54]
mov edx, 0x5107f044
mov eax, ebx
call fcn.5107a334
test al, al
jne 0x5107b3b3
mov eax, dword [0x5107d928]
mov eax, dword [eax]
call fcn.5103eb0c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5107b7b4
call fcn.5107a8d8
test al, al
jne 0x5107b3d5
mov eax, dword [0x5107d928]
mov eax, dword [eax]
call fcn.5103eb0c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5107b7b4
mov eax, dword [0x5107d814]
mov eax, dword [eax]
call fcn.5103b6c0
mov eax, dword [0x5107d928]
mov eax, dword [eax]
call fcn.5103e9d0
cmp dword [0x5107f044], 0
jle 0x5107b625
mov eax, dword [0x5107d814]
mov eax, dword [eax]
mov edx, dword [0x5107d9a4]
mov edx, dword [edx]
mov dword [edx + 0x207c], eax
mov dword [edx + 0x2078], 0x510795e4
mov eax, dword [0x5107d814]
mov eax, dword [eax]
mov eax, dword [eax + 0x308]
mov edx, dword [0x5107f044]
call fcn.5105dd80
call sub.kernel32.dll_GetTickCount
mov edx, dword [0x5107d814]
mov edx, dword [edx]
mov dword [edx + 0x324], eax
mov eax, dword [0x5107d814]
mov eax, dword [eax]
xor edx, edx
mov dword [eax + 0x328], edx
mov eax, dword [0x5107d814]
mov eax, dword [eax]
xor edx, edx
mov dword [eax + 0x330], edx
mov dword [eax + 0x334], edx
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0x14]
mov edi, eax
dec edi
test edi, edi
jl 0x5107b55f
inc edi
xor esi, esi
lea ecx, [ebp - 0x5c]
mov edx, esi
mov eax, ebx
call fcn.5101be58
mov edx, dword [ebp - 0x5c]
lea ecx, [ebp - 0x58]
mov eax, ebx
call fcn.5101c038
mov eax, dword [ebp - 0x58]
mov edx, 0x5107b96c
call fcn.5100493c
je 0x5107b557
lea ecx, [ebp - 0x64]
mov edx, esi
mov eax, ebx
call fcn.5101be58
mov eax, dword [ebp - 0x64]
lea ecx, [ebp - 0x60]
mov edx, 0x5107b978
call fcn.51008f28
mov edx, dword [ebp - 0x60]
mov eax, 0x5107f048
call fcn.51004594
lea eax, [ebp - 0x68]
mov ecx, dword [0x5107f048]
mov edx, 0x5107b988
call fcn.51004844
mov edx, dword [ebp - 0x68]
mov eax, dword [0x5107d9a4]
mov eax, dword [eax]
call fcn.5106196c
mov dword [0x5107f068], eax
mov eax, dword [0x5107d814]
mov eax, dword [eax]
mov edx, dword [eax + 0x33c]
lea eax, [ebp - 0x6c]
mov ecx, dword [0x5107f048]
call fcn.51004844
mov edx, dword [ebp - 0x6c]
mov eax, dword [0x5107f068]
call fcn.5101d564
lea ecx, [ebp - 0x70]
mov edx, esi
mov eax, ebx
call fcn.5101be58
mov eax, dword [ebp - 0x70]
mov edx, 0x5107b8dc
call fcn.5100493c
je 0x5107b557
lea ecx, [ebp - 0x74]
mov eax, dword [0x5107d814]
mov eax, dword [eax]
mov eax, dword [eax + 0x33c]
mov edx, dword [0x5107f048]
call fcn.51078ea0
inc esi
dec edi
jne 0x5107b47d
mov eax, dword [0x5107d814]
mov eax, dword [eax]
mov ebx, dword [eax + 0x308]
mov eax, ebx
call fcn.5105dba8
mov edx, eax
mov eax, dword [0x5107d814]
mov eax, ebx
call fcn.5105dd90
call fcn.5104960c
test al, al
je 0x5107b5ad
mov eax, dword [0x5107d814]
mov eax, dword [eax]
mov ebx, dword [eax + 0x308]
mov eax, ebx
call fcn.5105dbe0
mov edx, eax
dec edx
mov eax, dword [0x5107d814]
mov eax, ebx
call fcn.5105dd90
mov eax, dword [0x5107d814]
mov eax, dword [eax]
mov eax, dword [eax + 0x2f8]
xor edx, edx
mov ecx, dword [eax]
call dword [ecx + 0x64]
mov eax, dword [0x5107d814]
mov eax, dword [eax]
mov eax, dword [eax + 0x2f8]
mov edx, dword [eax]
call dword [edx + 0x7c]
mov eax, dword [0x5107d928]
mov eax, dword [eax]
call fcn.5103e9d0
mov eax, dword [0x5107d928]
mov eax, dword [eax]
call fcn.5103e9d0
mov eax, dword [0x5107d814]
mov eax, dword [eax]
mov eax, dword [eax + 0x304]
mov edx, 0x5107b998
call fcn.51044dac
mov eax, dword [0x5107d814]
mov eax, dword [eax]
mov eax, dword [eax + 0x30c]
mov edx, 0x5107b9c0
call fcn.51044dac
mov eax, dword [0x5107d928]
mov eax, dword [eax]
call fcn.5103e9d0
mov eax, dword [0x5107d928]
mov eax, dword [eax]
call fcn.5103eaf4
lea edx, [ebp - 0x7c]
mov eax, 3
call fcn.51002ac4
mov eax, dword [ebp - 0x7c]
lea edx, [ebp - 0x78]
call fcn.51008914
cmp dword [ebp - 0x78], 0
je 0x5107b6dd
lea edx, [ebp - 0x84]
mov eax, 4
call fcn.51002ac4
mov eax, dword [ebp - 0x84]
lea edx, [ebp - 0x80]
call fcn.51008914
cmp dword [ebp - 0x80], 0
je 0x5107b6dd
push dword [0x5107f04c]
push 0x5107b9e0
lea edx, [ebp - 0x88]
mov eax, 3
call fcn.51002ac4
push dword [ebp - 0x88]
push 0x5107b9f4
lea edx, [ebp - 0x8c]
mov eax, 4
call fcn.51002ac4
push dword [ebp - 0x8c]
push 0x5107ba00
push 0x5107ba0c
push 0x5107ba18
push 0x5107ba0c
push 0x5107ba28
mov eax, 0x5107f04c
mov edx, 0xa
call fcn.510048b8
jmp 0x5107b71f
push dword [0x5107f04c]
push 0x5107ba34
push 0x5107ba44
push 0x5107b9f4
push 0x5107ba50
push 0x5107ba00
push 0x5107ba0c
push 0x5107ba18
push 0x5107ba0c
push 0x5107ba28
mov eax, 0x5107f04c
mov edx, 0xa
call fcn.510048b8
mov eax, dword [0x5107d928]
mov eax, dword [eax]
call fcn.5103e9d0
push 5
mov eax, dword [0x5107f04c]
call fcn.510049f0
push eax
call sub.kernel32.dll_WinExec
cmp eax, 0x1f
ja 0x5107b758
mov ecx, 0x5107ba5c
mov dl, 1
mov eax, dword [0x51007aec]
call fcn.5100c314
call fcn.51003f1c
mov eax, dword [0x5107d928]
mov eax, dword [eax]
call fcn.5103e9d0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5107b7b4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5107b7e4
lea eax, [ebp - 0x90]
call fcn.51004540
lea eax, [ebp - 0x8c]
mov edx, 0x1f
call fcn.51004564
ret