Function at 0x7037f9ad
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x42c
mov eax, dword [0x703c1050]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 8]
and dword [ebp - 0x40c], 0
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov edi, dword [ebp + 0xc]
push 0
mov dword [ebp - 0x428], edx
lea edx, [ebp - 0x40c]
push edx
push dword [ebp + 0x18]
mov dword [ebp - 0x42c], ecx
push edi
push eax
mov byte [ebp - 0x405], 0
call fcn.7037f7b2
mov esi, eax
xor eax, eax
cmp esi, eax
je 0x7037fc62
cmp ebx, eax
je 0x7037fc62
push eax
push 0x80
push 2
push eax
push eax
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x41c], eax
je 0x7037fc62
and dword [ebp - 0x410], 0
cmp di, 0x17
je 0x7037fa69
push 0
lea ecx, [ebp - 0x410]
push ecx
push dword [ebp - 0x40c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
setg byte [ebp - 0x405]
jmp 0x7037fc56
mov eax, dword [ebp - 0x40c]
and dword [ebp - 0x40c], 0
lea edi, [esi + eax - 1]
mov dword [ebp - 0x414], esi
mov ebx, esi
mov dword [ebp - 0x420], edi
mov byte [ebp - 0x405], 1
cmp ebx, edi
jae 0x7037fc08
cmp byte [ebx], 0x7b
jne 0x7037faa2
cmp byte [ebx + 1], 0x25
je 0x7037faa7
inc ebx
cmp ebx, edi
jb 0x7037fa97
cmp ebx, edi
je 0x7037fbfb
push 0
lea eax, [ebp - 0x410]
push eax
mov eax, ebx
sub eax, esi
push eax
push esi
push dword [ebp - 0x41c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
mov eax, dword [ebp - 0x410]
jle 0x7037fae7
mov ecx, ebx
sub ecx, dword [ebp - 0x414]
mov byte [ebp - 0x405], 1
cmp eax, ecx
je 0x7037faee
mov byte [ebp - 0x405], 0
add dword [ebp - 0x40c], eax
inc ebx
inc ebx
mov dword [ebp - 0x414], ebx
jmp 0x7037fb0a
cmp byte [ebx], 0x25
jne 0x7037fb09
cmp byte [ebx + 1], 0x7d
je 0x7037fb0e
inc ebx
cmp ebx, edi
jb 0x7037fafe
push 0xa
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x414]
call dword [sym.imp.MSVCR80.dll_strtol]
mov ecx, dword [ebp - 0x42c]
add esp, 0xc
push dword [ebp + 0x18]
push eax
call fcn.7037f869
test eax, eax
je 0x7037fbf1
lea esi, [eax + 2]
movzx eax, word [eax]
mov dword [ebp - 0x418], eax
jmp 0x7037fbe4
cmp dword [ebp - 0x418], 0
je 0x7037fbf1
mov edi, pe_nt_image_headers32
cmp dword [ebp - 0x418], edi
jae 0x7037fb6e
mov edi, dword [ebp - 0x418]
xor eax, eax
push eax
push eax
push 0x400
lea ecx, [ebp - 0x404]
push ecx
push edi
push esi
push eax
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
lea ecx, [ebp - 0x410]
push ecx
push eax
mov dword [ebp - 0x424], eax
lea eax, [ebp - 0x404]
push eax
push dword [ebp - 0x41c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
mov eax, dword [ebp - 0x410]
jle 0x7037fbc8
cmp eax, dword [ebp - 0x424]
mov byte [ebp - 0x405], 1
je 0x7037fbcf
mov byte [ebp - 0x405], 0
add dword [ebp - 0x40c], eax
sub dword [ebp - 0x418], edi
lea esi, [esi + edi*2]
mov edi, dword [ebp - 0x420]
cmp byte [ebp - 0x405], 0
jne 0x7037fb4e
inc ebx
inc ebx
mov esi, ebx
mov dword [ebp - 0x414], esi
cmp byte [ebp - 0x405], 0
jne 0x7037fa8f
cmp byte [ebp - 0x405], 0
je 0x7037fc56
push 0
lea eax, [ebp - 0x410]
push eax
mov eax, edi
sub eax, esi
inc eax
push eax
push esi
push dword [ebp - 0x41c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
mov eax, dword [ebp - 0x410]
jle 0x7037fc49
sub edi, dword [ebp - 0x414]
mov byte [ebp - 0x405], 1
inc edi
cmp eax, edi
je 0x7037fc50
mov byte [ebp - 0x405], 0
add dword [ebp - 0x40c], eax
push dword [ebp - 0x41c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x428]
test eax, eax
pop edi
pop esi
pop ebx
je 0x7037fc77
mov ecx, dword [ebp - 0x40c]
mov dword [eax], ecx
mov ecx, dword [ebp - 4]
mov al, byte [ebp - 0x405]
xor ecx, ebp
call fcn.7038fba1
leave
ret 0x14