Function at 0x409260
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x44a71e
mov eax, dword fs:[0]
push eax
sub esp, 0x1b0
mov eax, dword [0x462e60]
xor eax, esp
mov dword [esp + 0x1ac], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x462e60]
xor eax, esp
push eax
lea eax, [esp + 0x1c4]
mov dword fs:[0], eax
mov ebx, ecx
mov ecx, dword [esp + 0x1d4]
xor eax, eax
cmp dword [ebx + 0x14], eax
mov dword [esp + 0x1cc], eax
mov dword [esp + 0x14], eax
je 0x40976b
cmp ecx, eax
je 0x40976b
mov dword [esp + 0x34], eax
mov byte [esp + 0x24], al
mov eax, ecx
mov dword [esp + 0x38], 0xf
lea esi, [eax + 1]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x4092d7
sub eax, esi
push eax
push ecx
lea ecx, [esp + 0x28]
call fcn.00402080
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x1c]
lea esi, [ebx + 0x50]
push ecx
mov ecx, esi
mov byte [esp + 0x1d4], 1
call fcn.004089b0
cmp dword [esp + 0x38], 0x10
mov byte [esp + 0x1cc], 0
jb 0x409325
mov edx, dword [esp + 0x24]
push edx
call fcn.00415b52
add esp, 4
mov edi, dword [esp + 0x18]
test edi, edi
mov ebp, dword [esi + 4]
je 0x409334
cmp edi, esi
je 0x409339
call fcn.00431767
mov esi, dword [esp + 0x1c]
cmp esi, ebp
jne 0x40935c
cmp dword [esp + 0x1f0], 0x10
jb 0x409785
mov eax, dword [esp + 0x1dc]
push eax
jmp 0x40977d
test edi, edi
jne 0x409365
call fcn.00431767
cmp esi, dword [edi + 4]
jne 0x40936f
call fcn.00431767
mov ecx, dword [esi + 0x128]
mov edx, dword [ebx + 0x14]
add esi, 0x28
push 0
push ecx
push edx
call fcn.004329db
add esp, 0xc
test eax, eax
je 0x4093e9
mov ecx, dword [0x44d7f4]
mov edx, dword [0x44d7f8]
mov eax, dword [str.fseek]
push 0x52
mov dword [esp + 0x64], edx
mov dword [esp + 0x5c], eax
mov eax, dword [0x44d7fc]
mov dword [esp + 0x60], ecx
mov cx, word [0x44d800]
lea edx, [esp + 0x6e]
push 0
push edx
mov dword [esp + 0x70], eax
mov word [esp + 0x74], cx
call fcn.00432700
lea eax, [esp + 0x64]
push eax
call fcn.0040eb60
add esp, 0x10
lea ecx, [esp + 0x1d8]
call fcn.00401a60
jmp 0x409785
mov ecx, dword [esi + 0x104]
push ecx
call fcn.00415b57
mov edx, dword [ebx + 0x14]
push edx
mov edi, eax
mov eax, dword [esi + 0x104]
push 1
push eax
push edi
call fcn.00432630
add esp, 0x14
cmp eax, 1
je 0x409477
mov ecx, dword [0x44d834]
mov edx, dword [0x44d838]
mov eax, dword [0x44d83c]
push 0x55
mov dword [esp + 0x64], eax
mov dword [esp + 0x5c], ecx
mov cx, word [0x44d840]
mov dword [esp + 0x60], edx
mov dl, byte [0x44d842]
lea eax, [esp + 0x6b]
push 0
push eax
mov word [esp + 0x70], cx
mov byte [esp + 0x72], dl
call fcn.00432700
lea ecx, [esp + 0x64]
push ecx
call fcn.0040eb60
push edi
call fcn.00415b52
add esp, 0x14
lea ecx, [esp + 0x1d8]
call fcn.00401a60
jmp 0x409785
lea edx, [esp + 0x1d8]
push edx
lea ecx, [esp + 0x40]
call fcn.00402150
lea eax, [esp + 0x3c]
push 0x44d690
push eax
mov byte [esp + 0x1d4], 2
call fcn.00401770
add esp, 8
test al, al
push 0xffffffffffffffff
push 0
je 0x4094c3
lea ecx, [ebx + 0x18]
push ecx
lea ecx, [esp + 0x48]
call fcn.00401f30
push esi
lea ecx, [esp + 0x40]
call fcn.00402180
jmp 0x4094d4
lea edx, [esp + 0x1e0]
push edx
lea ecx, [esp + 0x48]
call fcn.00401f30
cmp dword [esp + 0x54], 0x10
mov eax, dword [esp + 0x40]
jae 0x4094e3
lea eax, [esp + 0x40]
push 0x44d6ac
push eax
call fcn.00431e5c
mov ebp, eax
add esp, 8
test ebp, ebp
mov dword [esp + 0x18], ebp
je 0x409710
test byte [esi + 0x114], 1
jne 0x409621
cmp dword [esi + 0x104], 0
jbe 0x4096e6
mov eax, dword [esi + 0x108]
add eax, 1
push eax
call fcn.00415b57
mov ecx, dword [esi + 0x108]
add ecx, 1
add esp, 4
test byte [esi + 0x114], 4
mov ebp, eax
mov dword [esp + 0x14], ecx
je 0x409558
mov eax, dword [esi + 0x104]
lea edx, [esp + 0x14]
push edx
push ebp
push eax
push edi
call fcn.00408090
jmp 0x40956b
mov edx, dword [esi + 0x104]
lea ecx, [esp + 0x14]
push ecx
push ebp
push edx
push edi
call fcn.00408050
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
add esp, 0x10
push eax
push 1
push ecx
push ebp
call fcn.00431d16
add esp, 0x10
cmp eax, 1
je 0x4095fe
push 0x103
lea edx, [esp + 0xc1]
push 0
push edx
mov byte [esp + 0xc8], 0
call fcn.00432700
mov eax, dword [esp + 0x4c]
add esp, 0xc
cmp dword [esp + 0x54], 0x10
jae 0x4095b6
lea eax, [esp + 0x40]
push eax
push str.fwrite
lea eax, [esp + 0xc4]
push 0x104
push eax
call fcn.0043264b
lea ecx, [esp + 0xcc]
push ecx
call fcn.0040eb60
push edi
call fcn.00415b52
add esp, 0x18
lea ecx, [esp + 0x3c]
call fcn.00401a60
lea ecx, [esp + 0x1d8]
call fcn.00401a60
jmp 0x409785
push ebp
call fcn.00415b52
mov edx, dword [ebx + 0x14]
push edx
call fcn.004328f8
mov eax, dword [esp + 0x1c]
mov ebp, dword [esp + 0x20]
add esp, 8
mov dword [esp + 0x14], eax
jmp 0x4096e6
mov ecx, dword [esi + 0x104]
push ebp
push 1
push ecx
push edi
call fcn.00431d16
add esp, 0x10
cmp eax, 1
je 0x40969b
mov edx, dword [0x44d7dc]
mov eax, dword [0x44d7e0]
mov ecx, dword [0x44d7e4]
mov dword [esp + 0x58], edx
mov edx, dword [0x44d7e8]
mov dword [esp + 0x5c], eax
mov ax, word [0x44d7ec]
mov dword [esp + 0x60], ecx
mov cl, byte [0x44d7ee]
push 0x51
mov dword [esp + 0x68], edx
lea edx, [esp + 0x6f]
push 0
push edx
mov word [esp + 0x74], ax
mov byte [esp + 0x76], cl
call fcn.00432700
lea eax, [esp + 0x64]
push eax
call fcn.0040eb60
push edi
call fcn.00415b52
add esp, 0x14
jmp 0x4095e4
mov ecx, dword [ebx + 0x14]
push ecx
call fcn.004328f8
add esp, 4
test eax, eax
je 0x4096dc
mov edx, dword [str.fflush]
mov eax, dword [0x44d7cc]
mov ecx, dword [0x44d7d0]
mov dword [esp + 0x58], edx
mov edx, dword [0x44d7d4]
mov dword [esp + 0x5c], eax
mov ax, word [0x44d7d8]
mov dword [esp + 0x60], ecx
mov cl, byte [0x44d7da]
jmp 0x409668
mov ecx, dword [esi + 0x104]
mov dword [esp + 0x14], ecx
push ebp
call fcn.004315c1
push edi
call fcn.00415b52
add esp, 8
lea ecx, [esp + 0x3c]
call fcn.00401a60
lea ecx, [esp + 0x1d8]
call fcn.00401a60
mov eax, dword [esp + 0x14]
jmp 0x409787
push 0x103
lea edx, [esp + 0xc1]
push 0
push edx
mov byte [esp + 0xc8], 0
call fcn.00432700
mov eax, dword [esp + 0x4c]
add esp, 0xc
cmp dword [esp + 0x54], 0x10
jae 0x40973e
lea eax, [esp + 0x40]
push eax
push 0x44d804
lea eax, [esp + 0xc4]
push 0x104
push eax
call fcn.0043264b
lea ecx, [esp + 0xcc]
push ecx
call fcn.0040eb60
add esp, 0x14
jmp 0x4095e4
cmp dword [esp + 0x1f0], 0x10
jb 0x409785
mov edx, dword [esp + 0x1dc]
push edx
call fcn.00415b52
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x1c4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1ac]
xor ecx, esp
call fcn.00431e6f
add esp, 0x1bc
ret 0x20