Function at 0x405240
Capabilities:
Copy file
Create process on windows

Disassembly:
sub esp, 0x20c
push ebx
mov ebx, dword [sym.imp.MSVCRT.dll_strstr]
push ebp
mov ebp, dword [esp + 0x218]
push esi
push edi
xor edi, edi
push 0x40d114
push ebp
mov dword [esp + 0x18], edi
call ebx
add esp, 8
test eax, eax
je 0x4054d5
lea eax, [esp + 0x1c]
push 0xff
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x4054d5
mov esi, dword [sym.imp.MSVCRT.dll_strrchr]
lea ecx, [esp + 0x1c]
push 0x5c
push ecx
call esi
add esp, 8
test eax, eax
je 0x4054d5
push 0x40d42c
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
mov dword [esp + 0x14], edi
je 0x4054c6
push 0x40d414
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov dword [esp + 0x18], eax
je 0x4054bf
mov edi, dword [esp + 0x224]
test edi, edi
jne 0x4053e4
push 0x2f
push 0x40d114
push ebp
call ebx
add esp, 8
add eax, 4
push eax
call esi
add esp, 8
test eax, eax
jne 0x40532a
push 0x40d114
push ebp
call ebx
add esp, 8
add eax, 3
lea edx, [esp + 0x1c]
push eax
push 0x40d40c
push 0x5c
push edx
call esi
add esp, 8
inc eax
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
jmp 0x4053a7
lea edi, [eax + 1]
mov al, byte [eax + 1]
test al, al
jne 0x40537b
push 0x40d114
push ebp
call ebx
add esp, 8
add eax, 3
push eax
push 0x40d40c
lea eax, [esp + 0x24]
push 0x5c
push eax
call esi
add esp, 8
inc eax
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
push 0
push 0
push 0
push 0x40e3b8
lea ecx, [esp + 0x38]
push 0x40d0fc
push ecx
call fcn.00402320
add esp, 0x24
jmp 0x4053a7
lea edx, [esp + 0x1c]
push 0x5c
push edx
call esi
mov edx, eax
add esp, 8
or ecx, 0xffffffff
xor eax, eax
inc edx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 1
push 0
push 0
lea ecx, [esp + 0x28]
push 0x40d248
push ecx
call fcn.004024d0
add esp, 0x14
test eax, eax
je 0x405405
push 1
push 0
push 0
lea edx, [esp + 0x28]
push 0x40d248
push edx
call fcn.004024d0
add esp, 0x14
mov edx, eax
mov edi, 0x40d240
jmp 0x4053e8
lea edx, [esp + 0x1c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x22c]
mov esi, dword [sym.imp.WININET.dll_DeleteUrlCacheEntry]
test eax, eax
je 0x405419
push ebp
call esi
push 0
push 0
lea ecx, [esp + 0x124]
push 0xff
push ecx
push ebp
push 0
call dword [esp + 0x30]
test eax, eax
jne 0x4054bb
push 1
push eax
push eax
lea edx, [esp + 0x28]
push 0x40d240
push edx
call fcn.004024d0
add esp, 0x14
test eax, eax
je 0x405466
push 0
push 0xffffffffffffffff
lea eax, [esp + 0x24]
push 0
push eax
call fcn.00404e80
add esp, 0x10
lea ecx, [esp + 0x1c]
push 0
lea edx, [esp + 0x120]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x4054bb
mov eax, dword [esp + 0x228]
test eax, eax
je 0x4054b0
push 5
push 0
lea eax, [esp + 0x24]
push 0
push eax
push 0x40d404
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
xor ecx, ecx
cmp eax, 0x20
setg cl
mov dword [esp + 0x10], ecx
jmp 0x4054b8
mov dword [esp + 0x10], 1
push ebp
call esi
mov edi, dword [esp + 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20c
ret
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20c
ret