Function at 0x4025f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea edi, [ebp - 0x214]
mov esi, ecx
push ebx
sub esp, 0x23c
mov dword [ebp - 0x21c], edx
mov dword [esp + 8], eax
mov eax, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov dword [esp + 0x14], 0x104
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [ebp - 0x22c], eax
call eax
mov eax, dword [sym.imp.kernel32.dll_GetFullPathNameW]
sub esp, 0x18
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x624240
mov dword [esp + 4], 0x104
mov dword [esp], edi
mov dword [ebp - 0x228], eax
call eax
sub esp, 0x10
cmp esi, 0xffffffff
jne 0x402682
mov eax, dword [ebp - 0x21c]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_strlen]
mov esi, eax
mov eax, dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40000000
mov dword [esp], edi
mov dword [ebp - 0x220], eax
call eax
sub esp, 0x1c
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x58109f
mov dword [eax + 4], 0x25c
mov eax, dword fs:[0x18]
mov dword [ebp - 0x224], eax
mov eax, dword [eax + 0x34]
mov dword [esp + 4], 0x581360
mov dword [esp + 8], eax
xor eax, eax
cmp ebx, 0xffffffff
setne al
mov dword [esp], eax
call fcn.00401dd0
cmp ebx, 0xffffffff
je 0x402878
lea eax, [ebp - 0x218]
mov dword [esp + 8], esi
mov esi, dword [sym.imp.kernel32.dll_WriteFile]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x21c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call esi
sub esp, 0x14
mov dword [esp], ebx
mov ebx, dword [sym.imp.kernel32.dll_CloseHandle]
call ebx
mov eax, dword [ebp + 0xc]
sub esp, 4
test eax, eax
je 0x402864
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], 0x104
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [ebp + 8]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], 0
mov eax, dword [ebp - 0x22c]
call eax
sub esp, 0x18
mov dword [esp], edi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x624020
mov dword [esp + 4], 0x104
mov eax, dword [ebp - 0x228]
call eax
sub esp, 0x10
mov dword [esp], edi
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40000000
mov eax, dword [ebp - 0x220]
call eax
sub esp, 0x1c
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x58109f
mov dword [eax + 4], 0x268
mov eax, dword [ebp - 0x224]
mov eax, dword [eax + 0x34]
mov dword [esp + 4], 0x581360
mov dword [esp + 8], eax
xor eax, eax
cmp edi, 0xffffffff
setne al
mov dword [esp], eax
call fcn.00401dd0
cmp edi, 0xffffffff
je 0x402878
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_strlen]
lea edx, [ebp - 0x218]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], edi
mov dword [esp + 4], eax
call esi
sub esp, 0x14
mov dword [esp], edi
call ebx
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret