Function at 0x403740
Capabilities:
Accept command line arguments
Extract resource via kernel32 functions
Move file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4129cd
mov eax, dword fs:[0]
push eax
sub esp, 0xf4
mov eax, dword [0x41a3b0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
xor eax, eax
mov dword [ebp - 0x48], 7
push eax
push 0x4143f4
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x4c], 0
mov word [ebp - 0x5c], ax
call fcn.004028f0
xor eax, eax
mov dword [ebp - 4], 0
push eax
push 0x4143f4
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], ax
call fcn.004028f0
lea eax, [ebp - 0x44]
mov byte [ebp - 4], 1
or ebx, 0xffffffff
push eax
mov dword [ebp - 0xf8], ebx
call fcn.00405fc0
add esp, 4
cmp dword [ebp - 0x34], 0
mov byte [ebp - 4], 2
jne 0x40383f
cmp dword [ebp - 0x30], 8
jb 0x4037f0
push dword [ebp - 0x44]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
mov dword [ebp - 0x30], 7
cmp dword [ebp - 0x18], 8
mov word [ebp - 0x44], ax
mov dword [ebp - 0x34], eax
jb 0x403811
push dword [ebp - 0x2c]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
mov dword [ebp - 0x18], 7
cmp dword [ebp - 0x48], 8
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], ax
jb 0x403c7c
push dword [ebp - 0x5c]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
jmp 0x403c7c
lea eax, [ebp - 0x94]
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov esi, eax
test esi, esi
je 0x403917
cmp dword [ebp - 0x94], 2
jle 0x403917
push dword [esi + 4]
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 3
call fcn.00402e60
push 0x414400
lea ecx, [ebp - 0x2c]
call fcn.00403160
push dword [esi + 8]
lea ecx, [ebp - 0x5c]
call fcn.00402e60
sub esp, 0x18
xor eax, eax
mov ecx, esp
mov dword [ebp - 0xfc], esp
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [ebp - 0x2c]
push eax
call fcn.004027d0
sub esp, 0x18
mov byte [ebp - 4], 4
mov ecx, esp
xor eax, eax
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [ebp - 0x5c]
push eax
call fcn.004027d0
mov byte [ebp - 4], 3
call fcn.00407570
add esp, 0x30
mov dword [ebp - 4], 2
test eax, eax
setne al
test al, al
jne 0x403917
jmp 0x4037df
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x414408
mov edi, eax
push 0x65
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push edi
mov dword [ebp - 0xf8], eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
lea eax, [ebp - 0x90]
push eax
call fcn.004060b0
add esp, 4
cmp dword [ebp - 0x7c], 8
lea ecx, [ebp - 0x90]
mov byte [ebp - 4], 6
cmovae ecx, dword [ebp - 0x90]
push ecx
lea ecx, [ebp - 0xac]
call fcn.00401220
lea eax, [ebp - 0xac]
mov byte [ebp - 4], 7
push eax
lea eax, [ebp - 0x74]
push eax
call fcn.00406480
add esp, 8
cmp dword [ebp - 0x98], 8
mov byte [ebp - 4], 9
jb 0x4039ab
push dword [ebp - 0xac]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
push 1
xor eax, eax
mov dword [ebp - 0x98], 7
push 0x41440c
lea ecx, [ebp - 0x74]
mov dword [ebp - 0x9c], 0
mov word [ebp - 0xac], ax
call fcn.004031b0
push 3
push 0x414410
lea ecx, [ebp - 0x74]
call fcn.004031b0
lea eax, [ebp - 0x74]
push eax
call fcn.004055f0
mov edi, eax
add esp, 4
test edi, edi
jne 0x403a4d
cmp dword [ebp - 0x60], 8
jb 0x403a09
push dword [ebp - 0x74]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
mov dword [ebp - 0x60], 7
cmp dword [ebp - 0x7c], 8
mov dword [ebp - 0x64], 0
mov word [ebp - 0x74], ax
jb 0x403a31
push dword [ebp - 0x90]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
mov dword [ebp - 0x7c], 7
mov dword [ebp - 0x80], 0
mov word [ebp - 0x90], ax
jmp 0x4037df
push dword [ebp - 0xf8]
call dword [sym.imp.KERNEL32.dll_LockResource]
push 0
lea ecx, [ebp - 0x78]
mov dword [ebp - 0x78], 0
push ecx
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x403a7f
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x403c51
call fcn.004036d0
mov ecx, eax
call fcn.00404e10
test al, al
je 0x403ac5
push 0x210
call sub.MSVCR120.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
push esi
call fcn.00406ac0
add esp, 8
test eax, eax
je 0x403aba
call fcn.004052a0
test eax, eax
je 0x403aba
push esi
call fcn.004067e0
add esp, 4
push esi
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
xor ebx, ebx
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0xc4]
push eax
call fcn.00406220
lea eax, [ebp - 0xc4]
mov byte [ebp - 4], 0xa
push eax
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0xdc]
push eax
call fcn.00405370
add esp, 0x14
push 0x414418
lea ecx, [ebp - 0xf4]
mov byte [ebp - 4], 0xb
call fcn.00401220
lea eax, [ebp - 0xdc]
mov byte [ebp - 4], 0xc
push eax
lea eax, [ebp - 0x74]
push eax
call fcn.00401d10
add esp, 8
test al, al
je 0x403bf3
lea eax, [ebp - 0xc4]
push eax
call fcn.00406ec0
add esp, 4
test eax, eax
je 0x403bf3
test ebx, ebx
jne 0x403b44
push ebx
jmp 0x403b51
call fcn.004036d0
mov ecx, eax
call fcn.00404d80
push eax
call fcn.00406dd0
add esp, 4
lea eax, [ebp - 0xc4]
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.00405620
lea eax, [ebp - 0xf4]
push eax
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0xac]
push eax
call fcn.00405370
lea eax, [ebp - 0xf4]
mov byte [ebp - 4], 0xd
push eax
lea eax, [ebp - 0xc4]
push eax
call fcn.00402da0
add esp, 0x1c
test al, al
je 0x403be4
cmp dword [ebp - 0x98], 8
lea ecx, [ebp - 0xac]
lea eax, [ebp - 0xdc]
cmovae ecx, dword [ebp - 0xac]
cmp dword [ebp - 0xc8], 8
push ecx
cmovae eax, dword [ebp - 0xdc]
push eax
call dword [sym.imp.MSVCR120.dll__wrename]
add esp, 8
test eax, eax
jne 0x403be4
lea eax, [ebp - 0xf4]
push eax
call fcn.00406ec0
add esp, 4
lea ecx, [ebp - 0xac]
mov byte [ebp - 4], 0xc
call fcn.004012d0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.004036d0
mov ecx, eax
call fcn.00404ec0
test al, al
jne 0x403c13
call fcn.00407860
test eax, eax
jne 0x403c18
call fcn.00406cb0
lea eax, [ebp - 0x74]
push eax
call fcn.00405d50
lea eax, [ebp - 0x90]
push eax
call fcn.00406fc0
add esp, 8
lea ecx, [ebp - 0xf4]
call fcn.004012d0
lea ecx, [ebp - 0xdc]
call fcn.004012d0
lea ecx, [ebp - 0xc4]
call fcn.004012d0
lea ecx, [ebp - 0x74]
call fcn.004012d0
lea ecx, [ebp - 0x90]
call fcn.004012d0
lea ecx, [ebp - 0x44]
call fcn.004012d0
lea ecx, [ebp - 0x2c]
call fcn.004012d0
lea ecx, [ebp - 0x5c]
call fcn.004012d0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00411746
mov esp, ebp
pop ebp
ret 0x10