Function at 0x402610
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, eax
call fcn.004024f0
xor esi, esi
mov dword [ebp - 4], eax
cmp eax, esi
jbe 0x40278e
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp + 0xc]
push 1
push 0x10
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], esi
call fcn.00401f10
lea ecx, [ebp - 0x10]
push ecx
mov ebx, eax
mov eax, dword [ebp + 0xc]
push 1
push 0x18
call fcn.00401f10
lea edx, [ebp - 0xc]
push edx
mov dword [ebp - 0x20], eax
push 1
push 0x10
mov eax, edi
call fcn.00401f10
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 8]
push eax
push 1
push 0x18
mov eax, edi
call fcn.00401f10
add esp, 0x30
mov dword [ebp - 0x18], eax
cmp ebx, esi
je 0x402695
push ebx
call fcn.0041272b
add esp, 4
mov eax, dword [ebp - 0x20]
cmp eax, esi
je 0x4026a5
push eax
call fcn.0041272b
add esp, 4
mov eax, dword [ebp - 0x1c]
cmp eax, esi
je 0x4026b5
push eax
call fcn.0041272b
add esp, 4
mov eax, dword [ebp - 0x18]
cmp eax, esi
je 0x4026c5
push eax
call fcn.0041272b
add esp, 4
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.004020c0
add esp, 4
test eax, eax
je 0x4026e5
mov esi, dword [eax]
inc esi
shl esi, 6
add esi, dword [eax + 4]
mov ebx, eax
call fcn.00402010
push edi
xor ebx, ebx
call fcn.004020c0
add esp, 4
test eax, eax
je 0x40270a
mov ecx, dword [eax]
inc ecx
shl ecx, 6
add ecx, dword [eax + 4]
mov ebx, eax
mov dword [ebp - 0x20], ecx
call fcn.00402010
mov ebx, dword [ebp - 0x20]
mov edx, dword [ebp + 0xc]
sub esi, ebx
sub esi, dword [ebp - 8]
mov ebx, dword [ebp - 4]
sub esi, dword [ebp - 0xc]
push 0x423550
add esi, dword [ebp - 0x10]
push edx
add esi, dword [ebp - 0x14]
add ebx, esi
mov dword [ebp - 4], ebx
call fcn.004119cb
mov esi, eax
add esp, 8
test esi, esi
je 0x40275e
push 2
push 0
push esi
call fcn.0041209d
push esi
call fcn.00411fae
push esi
mov ebx, eax
call fcn.00412186
add esp, 0x14
mov eax, ebx
cmp ebx, dword [ebp - 4]
jbe 0x402762
sub ebx, dword [ebp - 4]
jmp 0x402767
xor eax, eax
jmp 0x402765
mov ebx, dword [ebp - 4]
sub ebx, eax
cmp ebx, 0x80
jbe 0x40291d
mov eax, dword [ebp + 8]
push 0
push edi
push eax
mov eax, edi
call fcn.00402930
add esp, 0xc
test al, al
je 0x40291d
xor esi, esi
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], esi
mov dword [ebp - 8], esi
call section..text
mov dword [ebp - 4], eax
cmp eax, esi
je 0x40291d
lea ecx, [ebp - 8]
mov eax, edi
call section..text
mov dword [ebp - 0x18], eax
cmp eax, esi
je 0x40291d
lea ecx, [ebp - 0x10]
push ecx
push 1
push 0x10
mov eax, edi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
call fcn.00401f10
lea edx, [ebp - 0xc]
push edx
mov esi, eax
push 1
push 0x18
mov eax, edi
call fcn.00401f10
push edi
mov dword [ebp - 0x1c], eax
call fcn.004020c0
push 0x423558
push edi
mov dword [ebp - 0x20], eax
call fcn.004119cb
mov ebx, eax
add esp, 0x24
test ebx, ebx
je 0x4028db
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 4]
push ebx
push eax
push 1
push ecx
call fcn.00411da0
mov edx, dword [ebp - 4]
push edx
call fcn.0041272b
push ebx
call fcn.00412186
add esp, 0x18
test esi, esi
je 0x402848
mov eax, dword [ebp - 0x10]
push eax
push esi
push 1
push 0x10
mov eax, edi
call fcn.00401fc0
push esi
call fcn.0041272b
add esp, 0x14
mov esi, dword [ebp - 0x1c]
test esi, esi
je 0x402868
mov ecx, dword [ebp - 0xc]
push ecx
push esi
push 1
push 0x18
mov eax, edi
call fcn.00401fc0
push esi
call fcn.0041272b
add esp, 0x14
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x40287f
push edi
mov eax, ebx
call fcn.00402240
add esp, 4
call fcn.00402010
push 0x423664
push edi
call fcn.004119cb
mov esi, eax
add esp, 8
test esi, esi
je 0x4028d2
mov edx, dword [ebp + 8]
mov eax, edx
lea edi, [eax + 1]
jmp 0x4028a0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4028a0
push esi
sub eax, edi
push eax
push 1
push edx
call fcn.00411da0
mov edx, dword [ebp - 8]
mov edi, dword [ebp - 0x18]
push esi
push edx
push 1
push edi
call fcn.00411da0
push edi
call fcn.0041272b
push esi
call fcn.00412186
add esp, 0x28
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
push eax
call fcn.0041272b
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.0041272b
add esp, 8
test esi, esi
je 0x4028fd
push esi
call fcn.0041272b
add esp, 4
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40290d
push eax
call fcn.0041272b
add esp, 4
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40291d
push eax
call fcn.0041272b
add esp, 4
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret