Function at 0x410ad0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x51938c]
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 0x410d26
cmp byte [edi + 0x2d], 0
je 0x410b4a
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 0x410b37
push esi
mov ecx, ebx
call fcn.004108b0
test al, al
je 0x410d55
mov ecx, dword [ebx + 0x80ec]
test ecx, ecx
je 0x410b4a
mov eax, dword [ecx]
push 0
push esi
push ebx
call dword [eax + 0xc]
mov esi, dword [edi + 0x4040]
test esi, esi
je 0x410b64
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x410b64
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 0x410b84
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x410b84
push eax
call ebx
mov ecx, dword [ebp - 8]
test ecx, ecx
je 0x410d26
mov esi, dword [edi + 0x4040]
test esi, esi
je 0x410ba6
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x410ba6
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [edi + 0x4054], 0
jne 0x410bc1
test esi, esi
je 0x410bbd
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x410bbd
push eax
call ebx
xor ebx, ebx
jmp 0x410c21
mov ebx, dword [edi + 0x4050]
lea eax, [edi + 0x4044]
test eax, eax
je 0x410bdb
mov eax, dword [eax]
test eax, eax
je 0x410bdb
mov edx, dword [eax]
jmp 0x410bdd
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 0x410c09
mov dword [edi + 0x4050], 0
jmp 0x410c0f
inc dword [edi + 0x4050]
test esi, esi
je 0x410c21
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x410c21
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 0x410c98
test eax, eax
jne 0x410c44
call fcn.004b8bba
mov dword [eax], 0x16
jmp 0x410c93
test ecx, ecx
je 0x410c5d
cmp esi, 0x2000
ja 0x410c5d
push esi
push ecx
push eax
call fcn.004b5330
add esp, 0xc
jmp 0x410c98
push 0x2000
push 0
push eax
call fcn.004b5160
add esp, 0xc
cmp dword [ebp - 8], 0
jne 0x410c80
call fcn.004b8bba
mov dword [eax], 0x16
jmp 0x410c93
cmp esi, 0x2000
jbe 0x410c98
call fcn.004b8bba
mov dword [eax], 0x22
call fcn.004b8aa4
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 0x410cc2
xor al, al
jmp 0x410cd1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x410cfd
mov al, 1
mov byte [edi + 0x2d], al
test al, al
jne 0x410d0c
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 0x410d0c
mov eax, dword [edx]
push 0
push dword [ebp - 0x10]
push ecx
mov ecx, edx
call dword [eax + 0xc]
jmp 0x410d0c
push dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
call fcn.004108b0
test al, al
je 0x410d3b
mov eax, dword [ebx]
test eax, eax
je 0x410d1b
push eax
call fcn.004b8bcd
add esp, 4
push 0x10
push ebx
call fcn.00489027
add esp, 8
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488adc
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebx]
test eax, eax
je 0x410d4a
push eax
call fcn.004b8bcd
add esp, 4
push 0x10
push ebx
call fcn.00489027
add esp, 8
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00488adc
mov esp, ebp
pop ebp
ret 4