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

Disassembly:
mov eax, 0x536c
call fcn.0040a490
mov eax, dword [0x41f060]
xor eax, esp
mov dword [esp + 0x5368], eax
push ebx
push ebp
push esi
mov esi, dword [esp + 0x537c]
mov ebx, 0xc350
push edi
mov dword [esp + 0x10], ebx
lea esp, [esp]
xor ebp, ebp
cmp dword [esi + 0x88], ebp
je 0x4014b3
movzx ecx, word [esi + 0x12]
mov eax, dword [esi + 0x1e]
cmp eax, ecx
je 0x40165b
mov edx, dword [esi + 0x22]
inc eax
push ebp
mov dword [esi + 0x1e], eax
mov eax, dword [esi]
push edx
push eax
call fcn.00409d82
mov ecx, dword [esi]
push ecx
push 0x2e
lea edx, [esp + 0x28]
push 1
push edx
call fcn.0040a459
mov eax, dword [esi]
movzx ecx, word [esp + 0x4c]
add dword [esi + 0x22], 0x2e
push eax
push ecx
lea edx, [esp + 0x68]
push 1
push edx
call fcn.0040a459
movzx eax, word [esp + 0x5c]
movzx ecx, word [esp + 0x60]
movzx edx, word [esp + 0x5e]
add ecx, eax
mov byte [esp + eax + 0x70], 0
mov eax, dword [esi + 4]
add eax, dword [esp + 0x6a]
add edx, ecx
mov ecx, dword [esi]
add dword [esi + 0x22], edx
push ebp
push eax
push ecx
call fcn.00409d82
mov edx, dword [esi]
push edx
push 0x1e
lea eax, [esi + 0x2a]
push 1
push eax
call fcn.0040a459
mov ecx, dword [esi]
movzx edx, word [esi + 0x44]
add esp, 0x48
push ecx
push edx
lea eax, [esp + 0x358]
push 1
push eax
call fcn.0040a459
movzx edx, word [esi + 0x46]
movzx ecx, word [esi + 0x44]
mov eax, dword [esi]
push 1
push edx
push eax
mov byte [esp + ecx + 0x36c], 0
call fcn.00409d82
add esp, 0x1c
xor eax, eax
mov edi, edi
mov cl, byte [esp + eax + 0x44]
mov byte [esp + eax + 0x148], cl
inc eax
test cl, cl
jne 0x401380
lea ecx, [esp + 0x148]
push 0x41928c
push ecx
call fcn.0040a750
mov edi, eax
add esp, 8
cmp edi, ebp
je 0x401406
lea ebp, [esi + 0x90]
lea edx, [esp + 0x148]
push edx
push ebp
lea eax, [esp + 0x45c]
push str._s_s
mov byte [edi], 0
push eax
inc edi
call fcn.0040a6c6
lea ecx, [esp + 0x464]
push ecx
call fcn.004189c4
add esp, 0x14
xor eax, eax
mov cl, byte [esp + eax + 0x44]
mov byte [esp + eax + 0x148], cl
inc eax
test cl, cl
jne 0x4013e2
push 0x41928c
push edi
call fcn.0040a750
mov edi, eax
add esp, 8
test edi, edi
jne 0x4013b1
lea edx, [esp + 0x44]
push edx
lea eax, [esi + 0x90]
push eax
lea ecx, [esp + 0x254]
push str._s_s
push ecx
call fcn.0040a6c6
lea edx, [esp + 0x25c]
push 0x419278
push edx
call fcn.0040a1a2
xor ebp, ebp
add esp, 0x18
mov dword [esi + 0x26], eax
cmp eax, ebp
je 0x401638
lea eax, [esp + 0x24c]
mov edx, eax
mov ecx, esi
sub ecx, edx
lea edx, [ecx + 0x194]
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x401460
cmp word [esi + 0x32], 8
mov eax, dword [esi + 0x40]
mov ecx, dword [esi + 0x3c]
mov dword [esi + 0x298], eax
mov dword [esi + 0x29c], ebp
mov dword [esi + 0x84], ecx
mov dword [esi + 0x88], ebp
mov dword [esi + 0x80], ebp
jne 0x4014b3
push 0x38
lea edi, [esi + 0x48]
push ebp
push edi
call fcn.0040a790
add esp, 0xc
push 0x38
push str.1.2.11
push 0xfffffffffffffff1
push edi
call fcn.00405bd0
movzx eax, word [esi + 0x32]
cmp ax, bp
jne 0x40155b
mov edi, 0x4e20
cmp ebx, edi
jge 0x4014cb
mov edi, ebx
mov eax, dword [esi + 0x84]
cmp edi, eax
jle 0x4014d7
mov edi, eax
mov edx, dword [esi]
push edx
push edi
lea eax, [esp + 0x560]
push 1
push eax
call fcn.0040a459
mov ecx, dword [esi + 0x26]
sub dword [esi + 0x84], edi
push ecx
push edi
lea edx, [esp + 0x570]
push 1
push edx
call fcn.0040a05c
mov ecx, dword [esi + 0x80]
add esp, 0x20
push edi
lea eax, [esp + 0x55c]
push eax
push ecx
call fcn.00408250
add dword [esi + 0x8c], edi
add dword [esi + 0x29c], edi
sub ebx, edi
mov dword [esi + 0x80], eax
mov dword [esp + 0x10], ebx
cmp dword [esi + 0x84], ebp
jne 0x401638
mov edx, dword [esi + 0x26]
push edx
call fcn.00409e7e
add esp, 4
mov dword [esi + 0x88], 1
jmp 0x401638
cmp ax, 8
jne 0x401638
mov edi, 0x4e20
cmp ebx, edi
jge 0x401570
mov edi, ebx
lea eax, [esp + 0x558]
mov dword [esi + 0x58], edi
mov dword [esi + 0x54], eax
cmp dword [esi + 0x4c], ebp
jne 0x4015c5
mov eax, dword [esi + 0x84]
mov ebp, 0x4e20
cmp eax, ebp
jge 0x4015a2
mov ebp, eax
test ebp, ebp
jne 0x4015a2
lea ecx, [esi + 0x48]
push ecx
call fcn.00407fc0
jmp 0x401540
mov eax, dword [esi]
push eax
push ebp
push 1
push 0x421660
call fcn.0040a459
add esp, 0x10
sub dword [esi + 0x84], ebp
mov dword [esi + 0x4c], ebp
mov dword [esi + 0x48], 0x421660
push 2
lea ebp, [esi + 0x48]
push ebp
call fcn.00405ce0
mov ecx, dword [esi + 0x26]
sub edi, dword [esi + 0x58]
push ecx
push edi
lea edx, [esp + 0x560]
push 1
push edx
mov ebx, eax
call fcn.0040a05c
mov ecx, dword [esi + 0x80]
add esp, 0x10
push edi
lea eax, [esp + 0x55c]
push eax
push ecx
call fcn.00408250
sub dword [esp + 0x10], edi
add dword [esi + 0x8c], edi
add dword [esi + 0x29c], edi
mov dword [esi + 0x80], eax
cmp ebx, 1
jne 0x401634
push ebp
call fcn.00407fc0
mov edx, dword [esi + 0x26]
push edx
call fcn.00409e7e
add esp, 4
mov dword [esi + 0x88], ebx
mov ebx, dword [esp + 0x10]
test ebx, ebx
jne 0x4012b0
xor eax, eax
mov ecx, dword [esp + 0x5378]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040a476
add esp, 0x536c
ret
mov eax, 1
jmp 0x401642