Function at 0x4177f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x549394]
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 0x417a46
cmp byte [edi + 0x2d], 0
je 0x41786a
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 0x417857
push esi
mov ecx, ebx
call fcn.004175d0
test al, al
je 0x417a75
mov ecx, dword [ebx + 0x80ec]
test ecx, ecx
je 0x41786a
mov eax, dword [ecx]
push 0
push esi
push ebx
call dword [eax + 0xc]
mov esi, dword [edi + 0x4040]
test esi, esi
je 0x417884
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x417884
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 0x4178a4
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x4178a4
push eax
call ebx
mov ecx, dword [ebp - 8]
test ecx, ecx
je 0x417a46
mov esi, dword [edi + 0x4040]
test esi, esi
je 0x4178c6
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x4178c6
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [edi + 0x4054], 0
jne 0x4178e1
test esi, esi
je 0x4178dd
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x4178dd
push eax
call ebx
xor ebx, ebx
jmp 0x417941
mov ebx, dword [edi + 0x4050]
lea eax, [edi + 0x4044]
test eax, eax
je 0x4178fb
mov eax, dword [eax]
test eax, eax
je 0x4178fb
mov edx, dword [eax]
jmp 0x4178fd
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 0x417929
mov dword [edi + 0x4050], 0
jmp 0x41792f
inc dword [edi + 0x4050]
test esi, esi
je 0x417941
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x417941
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 0x4179b8
test eax, eax
jne 0x417964
call fcn.004dcb93
mov dword [eax], 0x16
jmp 0x4179b3
test ecx, ecx
je 0x41797d
cmp esi, 0x2000
ja 0x41797d
push esi
push ecx
push eax
call fcn.004d92f0
add esp, 0xc
jmp 0x4179b8
push 0x2000
push 0
push eax
call fcn.004d9120
add esp, 0xc
cmp dword [ebp - 8], 0
jne 0x4179a0
call fcn.004dcb93
mov dword [eax], 0x16
jmp 0x4179b3
cmp esi, 0x2000
jbe 0x4179b8
call fcn.004dcb93
mov dword [eax], 0x22
call fcn.004dca7d
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 0x4179e2
xor al, al
jmp 0x4179f1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x417a1d
mov al, 1
mov byte [edi + 0x2d], al
test al, al
jne 0x417a2c
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 0x417a2c
mov eax, dword [edx]
push 0
push dword [ebp - 0x10]
push ecx
mov ecx, edx
call dword [eax + 0xc]
jmp 0x417a2c
push dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
call fcn.004175d0
test al, al
je 0x417a5b
mov eax, dword [ebx]
test eax, eax
je 0x417a3b
push eax
call fcn.004dcba6
add esp, 4
push 0x10
push ebx
call fcn.00497977
add esp, 8
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049742c
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebx]
test eax, eax
je 0x417a6a
push eax
call fcn.004dcba6
add esp, 4
push 0x10
push ebx
call fcn.00497977
add esp, 8
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0049742c
mov esp, ebp
pop ebp
ret 4