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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a8b06
mov eax, dword fs:[0]
push eax
sub esp, 0xcc
mov eax, dword [0x4e106c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x84], ecx
push 0
mov ecx, dword [ebp - 0x84]
add ecx, 0x20
call fcn.004031bb
mov dword [ebp - 0xa0], 0x4be490
mov eax, dword [ebp - 0x84]
mov eax, dword [eax + 4]
and eax, 0x40
je 0x487eb9
mov dword [ebp - 0xa0], 0x4be498
jmp 0x487ed1
mov eax, dword [ebp - 0x84]
mov eax, dword [eax + 4]
and eax, 0x20
je 0x487ed1
mov dword [ebp - 0xa0], 0x4be4a0
mov eax, dword [ebp - 0x84]
and dword [eax], 0
push dword [ebp - 0xa0]
lea ecx, [ebp + 8]
call fcn.004026c4
push eax
call fcn.004687f8
pop ecx
pop ecx
mov ecx, dword [ebp - 0x84]
mov dword [ecx], eax
mov eax, dword [ebp - 0x84]
cmp dword [eax], 0
jne 0x487f13
mov ecx, dword [ebp - 0x84]
call fcn.0048856f
jmp 0x4884eb
mov byte [ebp - 0x85], 1
and dword [ebp - 0x8c], 0
mov eax, dword [ebp - 0x84]
mov dword [eax + 0x18], 1
mov eax, dword [ebp - 0x84]
mov eax, dword [eax + 4]
and eax, 0x10
je 0x488316
push 2
push 0
mov eax, dword [ebp - 0x84]
push dword [eax]
call fcn.00468b42
add esp, 0xc
mov eax, dword [ebp - 0x84]
push dword [eax]
call fcn.0046913b
pop ecx
mov ecx, dword [ebp - 0x84]
mov dword [ecx + 0x10], eax
push 0
push 0
mov eax, dword [ebp - 0x84]
push dword [eax]
call fcn.00468b42
add esp, 0xc
mov dword [ebp - 0x90], 0x400
mov eax, dword [ebp - 0x84]
mov eax, dword [eax + 0x10]
cmp eax, dword [ebp - 0x90]
jge 0x487fa9
mov eax, dword [ebp - 0x84]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x90], eax
cmp dword [ebp - 0x90], 0
je 0x488311
push dword [ebp - 0x90]
call fcn.00455e19
pop ecx
mov dword [ebp - 0xb0], eax
mov eax, dword [ebp - 0xb0]
mov dword [ebp - 0x9c], eax
cmp dword [ebp - 0x90], 0
je 0x48801f
mov eax, dword [ebp - 0x84]
push dword [eax]
push 1
push dword [ebp - 0x90]
push dword [ebp - 0x9c]
call fcn.00469312
add esp, 0x10
cmp eax, 1
jne 0x48800c
mov dword [ebp - 0xa8], 1
jmp 0x488013
and dword [ebp - 0xa8], 0
mov al, byte [ebp - 0xa8]
mov byte [ebp - 0x85], al
movzx eax, byte [ebp - 0x85]
test eax, eax
je 0x4882f9
and dword [ebp - 0x94], 0
mov eax, dword [ebp - 0x84]
mov eax, dword [eax + 4]
and eax, 0xfffffffa
mov ecx, dword [ebp - 0x84]
mov dword [ecx + 4], eax
mov eax, dword [ebp - 0x94]
shl eax, 4
cmp dword [eax + 0x4e1bc8], 0
je 0x488148
mov eax, dword [ebp - 0x94]
shl eax, 4
mov ecx, dword [ebp - 0x8c]
cmp ecx, dword [eax + 0x4e1bcc]
jge 0x4880c2
mov eax, dword [ebp - 0x8c]
cmp eax, dword [ebp - 0x90]
jge 0x4880b1
mov eax, dword [ebp - 0x9c]
add eax, dword [ebp - 0x8c]
movsx eax, byte [eax]
mov ecx, dword [ebp - 0x94]
shl ecx, 4
mov ecx, dword [ecx + 0x4e1bc8]
mov edx, dword [ebp - 0x8c]
movsx ecx, byte [ecx + edx]
cmp eax, ecx
je 0x4880b3
jmp 0x4880c2
mov eax, dword [ebp - 0x8c]
inc eax
mov dword [ebp - 0x8c], eax
jmp 0x488060
mov eax, dword [ebp - 0x94]
shl eax, 4
mov ecx, dword [ebp - 0x8c]
cmp ecx, dword [eax + 0x4e1bcc]
jne 0x48812f
mov eax, dword [ebp - 0x94]
shl eax, 4
mov ecx, dword [ebp - 0x84]
mov ecx, dword [ecx + 4]
or ecx, dword [eax + 0x4e1bd4]
mov eax, dword [ebp - 0x84]
mov dword [eax + 4], ecx
cmp dword [ebp - 0x8c], 2
jne 0x488110
mov eax, dword [ebp - 0x84]
mov dword [eax + 0x18], 2
mov eax, dword [ebp - 0x94]
shl eax, 4
push dword [eax + 0x4e1bd0]
mov ecx, dword [ebp - 0x84]
add ecx, 0x38
call fcn.00406eb9
jmp 0x488148
mov eax, dword [ebp - 0x94]
inc eax
mov dword [ebp - 0x94], eax
and dword [ebp - 0x8c], 0
jmp 0x48804a
mov eax, dword [ebp - 0x90]
cmp eax, dword [ebp - 0x8c]
jle 0x48816e
push 0
push dword [ebp - 0x8c]
mov eax, dword [ebp - 0x84]
push dword [eax]
call fcn.00468b42
add esp, 0xc
cmp dword [ebp - 0x8c], 0
jne 0x4882bc
lea ecx, [ebp - 0x28]
call fcn.004022ad
and dword [ebp - 4], 0
push dword [ebp - 0x90]
push dword [ebp - 0x9c]
push ecx
mov ecx, esp
mov dword [ebp - 0xc8], esp
push 0x4bdeec
call fcn.004017f0
lea ecx, [ebp - 0x80]
call fcn.00415cea
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x90]
inc eax
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00455e19
pop ecx
mov dword [ebp - 0xb4], eax
mov eax, dword [ebp - 0xb4]
mov dword [ebp - 0xa4], eax
lea ecx, [ebp - 0x28]
call fcn.004043d8
cmp eax, dword [ebp - 0x90]
jge 0x4881fe
push dword [ebp - 0x90]
lea ecx, [ebp - 0x28]
call fcn.00404380
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0x48], eax
push ecx
mov ecx, esp
mov dword [ebp - 0xcc], esp
push 0x4be4a8
call fcn.004017f0
push dword [ebp - 0xa4]
lea ecx, [ebp - 0x80]
call fcn.00489676
mov dword [ebp - 0xb8], eax
push dword [ebp - 0xb8]
push dword [ebp - 0xa4]
lea ecx, [ebp - 0x28]
call fcn.00401e9e
push eax
push 0
lea ecx, [ebp - 0x28]
call fcn.004044bc
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0xbc], eax
push dword [ebp - 0xbc]
call fcn.00455c15
pop ecx
push ecx
mov ecx, esp
mov dword [ebp - 0xd0], esp
lea eax, [ebp - 0x28]
push eax
call fcn.00415bbe
lea eax, [ebp - 0x40]
push eax
call fcn.0048523c
pop ecx
pop ecx
mov dword [ebp - 0xc0], eax
push dword [ebp - 0xc0]
mov ecx, dword [ebp - 0x84]
add ecx, 0x38
call fcn.004020fa
lea ecx, [ebp - 0x40]
call fcn.004020b1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x80]
call fcn.00401b00
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.004020b1
mov ecx, dword [ebp - 0x84]
add ecx, 0x38
call fcn.00401e75
movzx eax, al
test eax, eax
je 0x4882f9
xor eax, eax
inc eax
imul eax, eax, 0
mov ecx, dword [ebp - 0x9c]
movsx eax, byte [ecx + eax]
cmp eax, 0x3c
jne 0x4882f9
push 0x4be004
mov ecx, dword [ebp - 0x84]
add ecx, 0x38
call fcn.00406eb9
mov eax, dword [ebp - 0x9c]
mov dword [ebp - 0xc4], eax
push dword [ebp - 0xc4]
call fcn.00455c15
pop ecx
jmp 0x488458
mov eax, dword [ebp - 0x84]
mov eax, dword [eax + 4]
and eax, 0x20
je 0x488458
mov eax, dword [ebp - 0x84]
mov eax, dword [eax + 4]
and eax, 0x40
je 0x488361
push 2
push 0
mov eax, dword [ebp - 0x84]
push dword [eax]
call fcn.00468b42
add esp, 0xc
mov eax, dword [ebp - 0x84]
push dword [eax]
call fcn.0046913b
pop ecx
mov ecx, dword [ebp - 0x84]
mov dword [ecx + 0x10], eax
and dword [ebp - 0x98], 0
mov eax, dword [ebp - 0x98]
shl eax, 4
cmp dword [eax + 0x4e1bc8], 0
je 0x488458
mov eax, dword [ebp - 0x98]
shl eax, 4
mov ecx, dword [ebp - 0x84]
mov ecx, dword [ecx + 4]
and ecx, dword [eax + 0x4e1bd4]
je 0x488446
mov eax, dword [ebp - 0x98]
shl eax, 4
mov eax, dword [eax + 0x4e1bcc]
mov dword [ebp - 0x8c], eax
cmp dword [ebp - 0x8c], 2
jne 0x4883c7
mov eax, dword [ebp - 0x84]
mov dword [eax + 0x18], 2
mov eax, dword [ebp - 0x98]
shl eax, 4
push dword [eax + 0x4e1bd0]
mov ecx, dword [ebp - 0x84]
add ecx, 0x38
call fcn.00406eb9
mov eax, dword [ebp - 0x84]
cmp dword [eax + 0x10], 0
je 0x4883f9
and dword [ebp - 0x8c], 0
jmp 0x488444
mov eax, dword [ebp - 0x84]
push dword [eax]
push 1
push dword [ebp - 0x8c]
mov eax, dword [ebp - 0x98]
shl eax, 4
push dword [eax + 0x4e1bc8]
call fcn.004695fa
add esp, 0x10
cmp eax, 1
jne 0x488431
mov dword [ebp - 0xac], 1
jmp 0x488438
and dword [ebp - 0xac], 0
mov al, byte [ebp - 0xac]
mov byte [ebp - 0x85], al
jmp 0x488458
mov eax, dword [ebp - 0x98]
inc eax
mov dword [ebp - 0x98], eax
jmp 0x488368
movzx eax, byte [ebp - 0x85]
test eax, eax
jne 0x488470
mov ecx, dword [ebp - 0x84]
call fcn.0048856f
jmp 0x4884eb
mov eax, dword [ebp - 0x84]
mov eax, dword [eax + 4]
and eax, 0x40
je 0x488492
mov eax, dword [ebp - 0x84]
mov ecx, dword [ebp - 0x84]
mov ecx, dword [ecx + 0x10]
mov dword [eax + 0x14], ecx
jmp 0x4884a1
mov eax, dword [ebp - 0x84]
mov ecx, dword [ebp - 0x8c]
mov dword [eax + 0x14], ecx
cmp dword [ebp - 0x8c], 0
je 0x4884e5
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push ecx
mov ecx, esp
mov dword [ebp - 0xd4], esp
push 0
call fcn.004017f0
push ecx
mov ecx, esp
mov dword [ebp - 0xd8], esp
push 0x4be1a4
call fcn.004017f0
mov eax, dword [ebp - 0x84]
add eax, 0x20
push eax
call fcn.00489c79
add esp, 0x18
mov al, byte [ebp - 0x85]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00455912
mov esp, ebp
pop ebp
ret 4