Function at 0x416ae0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x52a394]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, ecx
push edi
imul edi, esi, 0x4058
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], 0
add edi, ebx
cmp dword [edi + 0x4038], 0
je 0x416d36
cmp byte [edi + 0x2d], 0
je 0x416b5a
push 0
lea eax, [ebp - 0xc]
push eax
lea eax, [edi + 0x14]
push eax
push dword [edi + 0x28]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x416b47
push esi
mov ecx, ebx
call fcn.004168c0
test al, al
je 0x416d65
mov ecx, dword [ebx + 0x80ec]
test ecx, ecx
je 0x416b5a
mov eax, dword [ecx]
push 0
push esi
push ebx
call dword [eax + 0xc]
mov esi, dword [edi + 0x4040]
test esi, esi
je 0x416b74
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x416b74
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [edi + 0x4054]
mov ebx, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov dword [ebp - 8], ecx
test esi, esi
je 0x416b94
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x416b94
push eax
call ebx
mov ecx, dword [ebp - 8]
test ecx, ecx
je 0x416d36
mov esi, dword [edi + 0x4040]
test esi, esi
je 0x416bb6
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x416bb6
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [edi + 0x4054], 0
jne 0x416bd1
test esi, esi
je 0x416bcd
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x416bcd
push eax
call ebx
xor ebx, ebx
jmp 0x416c31
mov ebx, dword [edi + 0x4050]
lea eax, [edi + 0x4044]
test eax, eax
je 0x416beb
mov eax, dword [eax]
test eax, eax
je 0x416beb
mov edx, dword [eax]
jmp 0x416bed
xor edx, edx
mov eax, dword [edx + 8]
mov ecx, ebx
dec eax
shr ecx, 2
and ecx, eax
and ebx, 3
mov eax, dword [edx + 4]
mov eax, dword [eax + ecx*4]
mov ebx, dword [eax + ebx*4]
add dword [edi + 0x4054], 0xffffffff
jne 0x416c19
mov dword [edi + 0x4050], 0
jmp 0x416c1f
inc dword [edi + 0x4050]
test esi, esi
je 0x416c31
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x416c31
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov esi, dword [ebx + 8]
lea eax, [edi + 0x2038]
mov ecx, dword [ebx]
mov dword [ebp - 8], ecx
test esi, esi
je 0x416ca8
test eax, eax
jne 0x416c54
call fcn.004c39da
mov dword [eax], 0x16
jmp 0x416ca3
test ecx, ecx
je 0x416c6d
cmp esi, 0x2000
ja 0x416c6d
push esi
push ecx
push eax
call fcn.004c0150
add esp, 0xc
jmp 0x416ca8
push 0x2000
push 0
push eax
call fcn.004bff80
add esp, 0xc
cmp dword [ebp - 8], 0
jne 0x416c90
call fcn.004c39da
mov dword [eax], 0x16
jmp 0x416ca3
cmp esi, 0x2000
jbe 0x416ca8
call fcn.004c39da
mov dword [eax], 0x22
call fcn.004c38c4
lea eax, [edi + 0x14]
mov dword [ebp - 8], 0
push eax
lea eax, [ebp - 8]
push eax
push dword [ebx + 8]
lea eax, [edi + 0x2038]
push eax
push dword [edi + 0x28]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x416cd2
xor al, al
jmp 0x416ce1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x416d0d
mov al, 1
mov byte [edi + 0x2d], al
test al, al
jne 0x416d1c
push dword [edi + 0x24]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 0x80ec]
test edx, edx
je 0x416d1c
mov eax, dword [edx]
push 0
push dword [ebp - 0x10]
push ecx
mov ecx, edx
call dword [eax + 0xc]
jmp 0x416d1c
push dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
call fcn.004168c0
test al, al
je 0x416d4b
mov eax, dword [ebx]
test eax, eax
je 0x416d2b
push eax
call fcn.004c39ed
add esp, 4
push 0x10
push ebx
call fcn.00493ff7
add esp, 8
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00493aac
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebx]
test eax, eax
je 0x416d5a
push eax
call fcn.004c39ed
add esp, 4
push 0x10
push ebx
call fcn.00493ff7
add esp, 8
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00493aac
mov esp, ebp
pop ebp
ret 4