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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x150
mov eax, dword [0x632b20]
xor eax, ebp
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [0x9cf788]
push ecx
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x148]
push eax
call fcn.00494d10
add esp, 0x10
push 0x5ecb14
lea ecx, [ebp - 0x148]
push ecx
call fcn.005cd6b5
add esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4951c6
or eax, 0xffffffff
jmp 0x49557f
mov edx, dword [ebp - 0x10]
push edx
call fcn.005ce115
add esp, 4
mov byte [ebp - 0x38], al
mov eax, dword [ebp - 0x10]
push eax
call fcn.005ce115
add esp, 4
mov byte [ebp - 0x37], al
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.005ce115
add esp, 4
mov byte [ebp - 0x36], al
mov byte [ebp - 0x35], 0
mov edx, dword [ebp - 0x10]
push edx
call fcn.005ce115
add esp, 4
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x10]
push eax
push 1
push 4
lea ecx, [ebp - 0x14c]
push ecx
call fcn.005cdfc1
add esp, 0x10
mov edx, dword [ebp - 0x10]
push edx
push 1
push 4
lea eax, [ebp - 0x44]
push eax
call fcn.005cdfc1
add esp, 0x10
mov ecx, dword [ebp - 0x10]
push ecx
push 1
push 4
lea edx, [ebp - 0x34]
push edx
call fcn.005cdfc1
add esp, 0x10
mov eax, dword [ebp - 0x10]
push eax
push 1
push 4
lea ecx, [ebp - 0x14]
push ecx
call fcn.005cdfc1
add esp, 0x10
mov edx, dword [ebp + 0x18]
sub edx, dword [ebp + 0x10]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp + 0x1c]
sub ecx, dword [ebp + 0x14]
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x24], 0
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0xc], edx
cmp dword [ebp + 0x10], 0
jge 0x49529d
mov eax, dword [ebp - 0x30]
add eax, dword [ebp + 0x10]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0xc], 0
mov ecx, dword [ebp - 0x24]
sub ecx, dword [ebp + 0x10]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp + 0x18]
cmp edx, dword [ebp - 0x34]
jle 0x4952b3
mov eax, dword [ebp + 0x18]
sub eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x30]
sub ecx, eax
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x20], 0
mov edx, dword [ebp + 0x14]
mov dword [ebp - 0x3c], edx
cmp dword [ebp + 0x14], 0
jge 0x4952df
mov eax, dword [ebp - 0x2c]
add eax, dword [ebp + 0x14]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x3c], 0
mov ecx, dword [ebp - 0x20]
sub ecx, dword [ebp + 0x14]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp + 0x1c]
cmp edx, dword [ebp - 0x14]
jle 0x4952f5
mov eax, dword [ebp + 0x1c]
sub eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x2c]
sub ecx, eax
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 4], 0x14
mov edx, dword [ebp - 0x3c]
imul edx, dword [ebp - 0x34]
add edx, dword [ebp - 0xc]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x20]
imul eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x24]
mov dword [ebp - 0x28], eax
mov dword [ebp - 8], 0
jmp 0x495328
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
cmp edx, dword [ebp - 0x2c]
jge 0x49537a
push 0
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 4]
lea edx, [ecx + eax*2]
push edx
mov eax, dword [ebp - 0x10]
push eax
call fcn.005cdc9c
add esp, 0xc
mov ecx, dword [ebp - 0x10]
push ecx
push 1
mov edx, dword [ebp - 0x30]
shl edx, 1
push edx
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 0x20]
lea edx, [ecx + eax*2]
push edx
call fcn.005cdb90
add esp, 0x10
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x34]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x28]
add ecx, dword [ebp - 0x18]
mov dword [ebp - 0x28], ecx
jmp 0x49531f
mov edx, dword [ebp - 0x34]
imul edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
lea ecx, [eax + edx*2]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 0x3c]
imul edx, dword [ebp - 0x34]
add edx, dword [ebp - 0xc]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x20]
imul eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x24]
mov dword [ebp - 0x28], eax
mov dword [ebp - 8], 0
jmp 0x4953b6
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
cmp edx, dword [ebp - 0x2c]
jge 0x495408
push 0
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 4]
lea edx, [ecx + eax*2]
push edx
mov eax, dword [ebp - 0x10]
push eax
call fcn.005cdc9c
add esp, 0xc
mov ecx, dword [ebp - 0x10]
push ecx
push 1
mov edx, dword [ebp - 0x30]
shl edx, 1
push edx
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 0x24]
lea edx, [ecx + eax*2]
push edx
call fcn.005cdb90
add esp, 0x10
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x34]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x28]
add ecx, dword [ebp - 0x18]
mov dword [ebp - 0x28], ecx
jmp 0x4953ad
mov edx, dword [ebp - 0x34]
imul edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
lea ecx, [eax + edx*2]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 0x3c]
imul edx, dword [ebp - 0x34]
add edx, dword [ebp - 0xc]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x20]
imul eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x24]
mov dword [ebp - 0x28], eax
mov dword [ebp - 8], 0
jmp 0x495444
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
cmp edx, dword [ebp - 0x2c]
jge 0x495571
mov dword [ebp - 0x150], 0
jmp 0x49546b
mov eax, dword [ebp - 0x150]
add eax, 1
mov dword [ebp - 0x150], eax
mov ecx, dword [ebp - 0x150]
cmp ecx, dword [ebp - 0x30]
jge 0x495524
mov edx, dword [ebp - 0x28]
add edx, dword [ebp - 0x150]
mov eax, dword [ebp + 0x28]
movzx ecx, word [eax + edx*2]
or ecx, 0xc000
mov edx, dword [ebp - 0x28]
add edx, dword [ebp - 0x150]
mov eax, dword [ebp + 0x28]
mov word [eax + edx*2], cx
mov ecx, dword [0xbff7ac]
cmp ecx, dword [ebp + 0xc]
jne 0x49551f
movsx edx, word [0xc1853c]
mov eax, dword [ebp + 0x10]
add eax, dword [ebp - 0x150]
cmp edx, eax
jg 0x49551f
mov ecx, dword [ebp + 0x10]
add ecx, dword [ebp - 0x150]
movsx edx, word [0xbff7bc]
cmp ecx, edx
jge 0x49551f
movsx eax, word [0xc18538]
mov ecx, dword [ebp + 0x14]
add ecx, dword [ebp - 8]
cmp eax, ecx
jg 0x49551f
mov edx, dword [ebp + 0x14]
add edx, dword [ebp - 8]
movsx eax, word [0xbff7b8]
cmp edx, eax
jge 0x49551f
mov ecx, dword [ebp - 0x28]
add ecx, dword [ebp - 0x150]
mov edx, dword [ebp + 0x28]
movzx eax, word [edx + ecx*2]
push eax
mov ecx, dword [ebp + 0x14]
add ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp + 0x10]
add edx, dword [ebp - 0x150]
push edx
call fcn.00495590
add esp, 0xc
jmp 0x49545c
push 0
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 4]
lea edx, [ecx + eax*2]
push edx
mov eax, dword [ebp - 0x10]
push eax
call fcn.005cdc9c
add esp, 0xc
mov ecx, dword [ebp - 0x10]
push ecx
push 1
mov edx, dword [ebp - 0x30]
shl edx, 1
push edx
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 0x28]
lea edx, [ecx + eax*2]
push edx
call fcn.005cdb90
add esp, 0x10
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x34]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x28]
add ecx, dword [ebp - 0x18]
mov dword [ebp - 0x28], ecx
jmp 0x49543b
mov edx, dword [ebp - 0x10]
push edx
call fcn.005cd459
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0x48]
xor ecx, ebp
call fcn.005cbcfe
mov esp, ebp
pop ebp
ret