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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
mov eax, dword [0x60940c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0xc]
push 0x5a9608
push edi
mov dword [ebp - 0x78], eax
call fcn.0055ba1e
mov esi, eax
add esp, 8
test esi, esi
je 0x49be64
push esi
push 0x20
lea eax, [ebp - 0x28]
push 1
push eax
call fcn.0055cf27
add esp, 0x10
cmp eax, 0x20
jae 0x49be76
push esi
call fcn.00561a91
add esp, 4
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0052b33d
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x28]
cmp dword [eax], 0x49445342
jne 0x49be64
cmp dword [eax + 4], 0x30344646
jne 0x49be64
movzx ecx, byte [ebp - 0x1d]
movzx eax, byte [ebp - 0x1e]
shl ecx, 8
add ecx, eax
mov edx, dword [ebp - 0x19]
movzx eax, byte [ebp - 0x1f]
shl ecx, 8
add ecx, eax
movzx eax, byte [ebp - 0x20]
shl ecx, 8
add eax, ecx
movzx ecx, byte [ebp - 0x15]
push ebx
mov ebx, eax
neg ebx
test dl, dl
cmovns ebx, eax
movzx eax, byte [ebp - 0x16]
shl ecx, 8
add ecx, eax
movzx eax, byte [ebp - 0x17]
shl ecx, 8
add ecx, eax
movzx eax, dh
mov edx, dword [ebp - 0x11]
shl ecx, 8
add eax, ecx
mov ecx, eax
neg ecx
test dl, dl
cmovns ecx, eax
movzx eax, byte [ebp - 0xe]
mov dword [ebp - 0x40], ecx
movzx ecx, byte [ebp - 0xd]
shl ecx, 8
add ecx, eax
movzx eax, byte [ebp - 0xf]
shl ecx, 8
add ecx, eax
movzx eax, dh
shl ecx, 8
add eax, ecx
mov ecx, eax
neg ecx
cmp byte [ebp - 9], 0
cmovge ecx, eax
mov dword [ebp - 0x44], ecx
test ebx, ebx
js 0x49c271
cmp dword [ebp - 0x40], 0
jl 0x49c271
test ecx, ecx
js 0x49c271
push esi
call fcn.0055baab
add esp, 4
test eax, eax
jne 0x49c271
push 0x5a9608
push edi
call fcn.0055ba1e
mov esi, eax
add esp, 8
mov dword [ebp - 0x6c], esi
test esi, esi
je 0x49c271
push 0
push 0x20
push esi
call fcn.0055d2ac
add esp, 0xc
test eax, eax
jne 0x49c271
push eax
push eax
push eax
push eax
push esi
lea eax, [ebp - 0x4c]
push eax
call fcn.0049afb0
mov dword [ebp - 0x58], eax
test eax, eax
je 0x49c271
push 0x5a9608
push edi
call fcn.0055ba1e
mov esi, eax
add esp, 8
mov dword [ebp - 0x70], esi
test esi, esi
je 0x49c271
push 0
lea eax, [ebx + 0x20]
push eax
push esi
call fcn.0055d2ac
add esp, 0xc
test eax, eax
jne 0x49c271
push eax
push eax
push eax
push eax
push esi
lea eax, [ebp - 0x50]
push eax
call fcn.0049afb0
mov dword [ebp - 0x5c], eax
test eax, eax
je 0x49c271
push 0x5a9608
push edi
call fcn.0055ba1e
mov esi, eax
add esp, 8
mov dword [ebp - 0x74], esi
test esi, esi
je 0x49c271
mov eax, dword [ebp - 0x40]
add eax, 0x20
push 0
add eax, ebx
push eax
push esi
call fcn.0055d2ac
add esp, 0xc
test eax, eax
jne 0x49c271
push eax
push eax
push eax
push eax
push esi
lea eax, [ebp - 0x54]
push eax
call fcn.0049afb0
mov dword [ebp - 0x60], eax
test eax, eax
je 0x49c271
push 0x5a9608
push dword [ebp - 0x48]
call fcn.0055ba1e
mov esi, eax
add esp, 8
test esi, esi
je 0x49c271
push 2
push 0
push esi
call fcn.0055d2ac
add esp, 0xc
test eax, eax
jne 0x49c271
push esi
call fcn.0055d8a5
mov ebx, eax
mov dword [ebp - 0x64], ebx
lea ecx, [ebx + 1]
push ecx
call fcn.0055cd50
mov edi, eax
add esp, 8
mov dword [ebp - 0x48], edi
test edi, edi
je 0x49c271
push 0
push 0
push esi
call fcn.0055d2ac
push esi
push ebx
push 1
push edi
call fcn.0055cf27
add esp, 0x1c
cmp eax, 0xffffffff
je 0x49c271
push esi
call fcn.0055baab
add esp, 4
cmp eax, 0xffffffff
je 0x49c271
mov esi, dword [ebp - 0x44]
lea eax, [esi + 1]
push eax
call fcn.0055cd50
add esp, 4
mov dword [ebp - 0x40], eax
test eax, eax
je 0x49c271
xor edi, edi
xor ebx, ebx
test esi, esi
jle 0x49c1ba
nop dword [eax]
xor esi, esi
push 8
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x58]
lea eax, [ebp - 0x4c]
push eax
call fcn.0049ad20
cmp eax, 8
jl 0x49c271
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x49c0fd
cmp eax, 4
jne 0x49c271
lea eax, [ebp - 0x30]
push eax
call fcn.0049c290
mov dword [ebp + esi*4 - 0x3c], eax
add esp, 4
inc esi
cmp esi, 2
jle 0x49c0d2
mov esi, dword [ebp - 0x3c]
lea eax, [esi + ebx]
mov dword [ebp - 0x68], eax
cmp eax, dword [ebp - 0x44]
jg 0x49c271
add ebx, dword [ebp - 0x40]
lea eax, [ebp - 0x50]
push esi
push ebx
push dword [ebp - 0x5c]
push eax
call fcn.0049ad20
cmp eax, esi
jl 0x49c271
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x49c14e
cmp eax, 4
jne 0x49c271
xor eax, eax
test esi, esi
jle 0x49c171
lea ecx, [eax + edi]
test ecx, ecx
js 0x49c16c
cmp ecx, dword [ebp - 0x64]
jge 0x49c16c
mov edx, dword [ebp - 0x48]
lea ecx, [eax + edi]
mov cl, byte [ecx + edx]
add byte [ebx + eax], cl
inc eax
cmp eax, esi
jl 0x49c154
mov eax, dword [ebp - 0x68]
add edi, esi
mov esi, dword [ebp - 0x38]
lea ebx, [esi + eax]
cmp ebx, dword [ebp - 0x44]
jg 0x49c271
add eax, dword [ebp - 0x40]
push esi
push eax
push dword [ebp - 0x60]
lea eax, [ebp - 0x54]
push eax
call fcn.0049ad20
cmp eax, esi
jl 0x49c271
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x49c1ae
cmp eax, 4
jne 0x49c271
add edi, dword [ebp - 0x34]
cmp ebx, dword [ebp - 0x44]
jl 0x49c0d0
push dword [ebp - 0x58]
lea eax, [ebp - 0x4c]
push eax
call fcn.0049af30
push dword [ebp - 0x5c]
lea eax, [ebp - 0x50]
push eax
call fcn.0049af30
push dword [ebp - 0x60]
lea eax, [ebp - 0x54]
push eax
call fcn.0049af30
push dword [ebp - 0x6c]
call fcn.0055baab
add esp, 4
test eax, eax
jne 0x49c271
push dword [ebp - 0x70]
call fcn.0055baab
add esp, 4
test eax, eax
jne 0x49c271
push dword [ebp - 0x74]
call fcn.0055baab
add esp, 4
test eax, eax
jne 0x49c271
push 0x5a960c
push dword [ebp - 0x78]
call fcn.0055ba1e
mov esi, eax
add esp, 8
test esi, esi
je 0x49c271
mov ebx, dword [ebp - 0x40]
push esi
push dword [ebp - 0x44]
push 1
push ebx
call fcn.0055bd63
add esp, 0x10
cmp eax, 0xffffffff
je 0x49c271
push esi
call fcn.0055baab
add esp, 4
cmp eax, 0xffffffff
je 0x49c271
push ebx
call fcn.00558829
push dword [ebp - 0x48]
call fcn.00558829
add esp, 8
mov eax, 1
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0052b33d
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.0052b33d
mov esp, ebp
pop ebp
ret