Function at 0x4071f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5700a8
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x5e1da0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
lea eax, [esi + 0x138]
xor ebx, ebx
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
movzx ecx, word [esi + 0x76]
movzx edx, word [esi + 0x74]
imul ecx, edx
add ecx, ecx
push ecx
call fcn.004575d3
sub esp, 0x4a0
mov edi, eax
lea eax, [ebp + 0x10]
mov ecx, esp
mov dword [ebp - 0x34], esp
push eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x30], ebx
call fcn.00405910
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x30]
push ecx
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0x28]
push edx
push edi
push eax
push ecx
mov ecx, esi
call fcn.00406160
cmp eax, ebx
jne 0x4072bb
cmp edi, ebx
je 0x407287
push edi
call fcn.004575de
add esp, 4
mov edx, dword [esi + 0x130]
mov eax, dword [edx + 0x14]
lea ecx, [esi + 0x130]
call eax
push fcn.004011c0
push 0x12
push 4
lea ecx, [ebp + 0x45c]
push ecx
mov dword [ebp - 4], 0xffffffff
call fcn.00552a95
xor eax, eax
jmp 0x4073ef
mov edx, dword [ebp - 0x28]
inc dword [esi + 0x6c]
mov eax, dword [esi + 0x6c]
add edx, 9
shr edx, 1
add edx, edx
add dword [esi + 0x84], edx
cmp eax, 0x20
jae 0x4072e0
mov ecx, dword [ebp + 0x24]
mov dword [esi + eax*4 + 0x94], ecx
mov eax, dword [esi + 0x8c]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
lea edx, [ebp - 0x2c]
push edx
push 4
push 0x5d9e58
push eax
call ebx
mov eax, dword [esi + 0x8c]
push 0
lea ecx, [ebp - 0x2c]
push ecx
push 4
lea edx, [ebp - 0x28]
push edx
push eax
call ebx
mov edx, dword [ebp - 0x28]
mov eax, dword [esi + 0x8c]
push 0
lea ecx, [ebp - 0x2c]
push ecx
push edx
push edi
push eax
call ebx
mov eax, dword [ebp - 0x28]
test al, 1
je 0x407347
mov eax, dword [esi + 0x8c]
push 0
lea ecx, [ebp - 0x2c]
push ecx
push 1
lea edx, [ebp - 0x21]
push edx
push eax
mov byte [ebp - 0x21], 0
call ebx
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x30]
mov ecx, dword [0x5d9e58]
neg edx
sbb edx, edx
mov dword [ebp - 0x20], ecx
mov ecx, dword [esi + 0x88]
and edx, 0x10
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x18], ecx
cmp byte [eax + edi - 1], 0
je 0x407372
mov dword [ebp - 0x14], eax
jmp 0x40738e
cmp byte [eax + edi - 2], 0
je 0x40737e
lea edx, [eax - 1]
jmp 0x40738b
cmp byte [eax + edi - 3], 0
lea edx, [eax - 2]
jne 0x40738b
lea edx, [eax - 3]
mov dword [ebp - 0x14], edx
inc eax
shr eax, 1
lea eax, [ecx + eax*2 + 8]
push 0
lea ecx, [ebp - 0x2c]
push ecx
push 0x10
lea edx, [ebp - 0x20]
mov dword [esi + 0x88], eax
mov eax, dword [esi + 0x90]
push edx
push eax
call ebx
test edi, edi
je 0x4073bd
push edi
call fcn.004575de
add esp, 4
mov edx, dword [esi + 0x130]
mov eax, dword [edx + 0x14]
lea ecx, [esi + 0x130]
call eax
push fcn.004011c0
push 0x12
push 4
lea ecx, [ebp + 0x45c]
push ecx
mov dword [ebp - 4], 0xffffffff
call fcn.00552a95
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005520da
mov esp, ebp
pop ebp
ret 0x4ac