Function at 0x418c28
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a4
mov eax, dword [0x43f600]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
or dword [ebx + 0x48], 0xffffffff
push esi
push edi
mov dword [ebp - 0x29c], eax
mov esi, edx
xor edx, edx
mov dword [ebx + 4], 3
mov dword [ebx + 0x34], esi
mov dword [ebx + 0x2c], 0x40e07b
mov dword [ebx + 0x38], edx
mov dword [ebx + 0x44], edx
xor eax, eax
lea edi, [ebx + 0x10]
mov dword [edi], edx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 0x2a0], ecx
cmp dword [esi + 0x74], edx
je 0x418dd7
mov eax, dword [ecx]
xor edi, edi
inc edi
cmp dword [esi + 0x88], 3
mov dword [ebp - 0x294], edi
mov dword [ebp - 0x28c], eax
mov dword [ebp - 0x288], edx
je 0x418cae
lea eax, [esi + 0x84]
mov dword [ebp - 0x298], eax
jmp 0x418cd4
push 0x4c
call fcn.0041f663
pop ecx
mov dword [ebp - 0x298], eax
test eax, eax
jne 0x418cd4
push str.malloc
push 0xe
call fcn.0041b8e6
mov eax, dword [ebp - 0x298]
pop ecx
pop ecx
lea ecx, [eax + 0x10]
mov dword [eax + 0x38], edi
mov dword [eax + 4], 3
mov dword [eax + 0x34], esi
xor edx, edx
mov dword [eax + 0x2c], edx
xor eax, eax
mov dword [ecx], edx
mov edi, ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [ebp - 0x294]
and al, 2
movsx eax, al
neg eax
sbb eax, eax
push ecx
mov edi, 0x278
and eax, edi
push edx
add eax, 0x10
push eax
lea eax, [ebp - 0x294]
push eax
push dword [esi + 0x78]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x418d54
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x418d60
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, esi
call fcn.0041b96d
mov ecx, dword [ebp - 0x29c]
mov dword [ecx + 4], eax
mov dword [ecx + 8], esi
or eax, 0xffffffff
jmp 0x418eff
mov edi, dword [ebp - 0x298]
and dword [edi + 0x24], 0
jmp 0x418d82
mov eax, dword [ebp - 0x294]
mov ecx, dword [ebp - 0x298]
and al, 2
movsx eax, al
neg eax
sbb eax, eax
and eax, edi
add eax, 0x10
mov dword [ecx + 0x24], eax
add dword [esi + 0x20], eax
mov edi, ecx
mov eax, dword [esi + 0x34]
lea ecx, [eax + 1]
mov dword [esi + 0x34], ecx
test eax, eax
jne 0x418da6
mov eax, dword [esi + 0x1c]
test al, 0x40
jne 0x418da6
or eax, 0x40
mov dword [esi + 0x1c], eax
test al, 0x20
je 0x418da6
mov eax, dword [esi + 8]
inc dword [eax + 0xc]
mov eax, dword [ebp - 0x29c]
add eax, 0x18
mov edx, dword [eax]
lea ecx, [edi + 8]
mov dword [ecx], edx
mov dword [edx + 4], ecx
mov dword [edi + 0xc], eax
mov dword [eax], ecx
inc dword [esi + 0x30]
inc dword [esi + 0x6c]
test byte [ebp - 0x294], 1
je 0x418efd
mov ecx, dword [ebp - 0x2a0]
test dword [esi + 0x1c], 0x1000000
je 0x418e33
mov eax, dword [ecx]
mov dword [ebx + 0x3c], eax
mov eax, dword [ecx + 4]
and dword [ebx + 0x28], 0
mov dword [ebx + 0x40], eax
mov eax, dword [esi + 0xec]
test eax, eax
je 0x418e0a
mov eax, dword [eax + 0x28]
mov dword [ebx + 0x28], eax
mov eax, dword [esi + 0xec]
mov dword [eax + 0x28], ebx
jmp 0x418e0d
mov dword [ebx + 0x28], ebx
cmp dword [esi + 0x6c], 0
mov dword [esi + 0xec], ebx
jne 0x418e26
mov ecx, esi
call fcn.00418bdc
mov ecx, dword [ebp - 0x2a0]
mov ecx, dword [ecx]
mov dword [ebx + 0x24], ecx
add dword [esi + 0x20], ecx
jmp 0x418ebb
lea eax, [ebx + 0x10]
push eax
push 0
push dword [ecx]
push dword [ecx + 4]
push dword [esi + 0x78]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x418e61
call edi
cmp eax, 0x3e5
je 0x418e67
call edi
jmp 0x418d37
and dword [ebx + 0x24], 0
jmp 0x418e75
mov eax, dword [ebp - 0x2a0]
mov eax, dword [eax]
mov dword [ebx + 0x24], eax
add dword [esi + 0x20], eax
test dword [esi + 0x1c], 0x100000
je 0x418ebb
xor eax, eax
push eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebx + 0x44], eax
test eax, eax
jne 0x418ea0
push str.CreateEvent
call edi
push eax
call fcn.0041b8e6
pop ecx
pop ecx
push 4
push 0xffffffffffffffff
push ebx
push 0x418a4e
push dword [ebx + 0x20]
lea eax, [ebx + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
test eax, eax
je 0x418e5a
mov eax, dword [esi + 0x34]
lea ecx, [eax + 1]
mov dword [esi + 0x34], ecx
test eax, eax
jne 0x418edf
mov eax, dword [esi + 0x1c]
test al, 0x40
jne 0x418edf
or eax, 0x40
mov dword [esi + 0x1c], eax
test al, 0x20
je 0x418edf
mov eax, dword [esi + 8]
inc dword [eax + 0xc]
mov eax, dword [ebp - 0x29c]
add eax, 0x18
mov edx, dword [eax]
lea ecx, [ebx + 8]
mov dword [ecx], edx
mov dword [edx + 4], ecx
mov dword [ebx + 0xc], eax
mov dword [eax], ecx
inc dword [esi + 0x30]
inc dword [esi + 0x6c]
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
xor ecx, ebp
pop esi
call fcn.0041ef20
leave
ret