Function at 0x487910
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
cmp dword [ebp + 8], 0
jne 0x487924
or eax, 0xffffffff
jmp 0x487e12
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3c]
and ecx, 0x8000
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3c]
and eax, 0xffff7fff
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x3c], eax
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x3a]
and eax, 0x20
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + 0x3a]
and edx, 0xffffffdf
mov eax, dword [ebp + 8]
mov word [eax + 0x3a], dx
cmp dword [ebp + 0xc], 0
jne 0x487970
or eax, 0xffffffff
jmp 0x487e12
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3c]
and edx, 0x100
je 0x487ab2
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3c]
and ecx, 1
jne 0x487995
or eax, 0xffffffff
jmp 0x487e12
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3c]
and eax, 0x400
je 0x4879ef
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
add edx, dword [ecx + 0x20]
mov eax, dword [ebp + 8]
cmp edx, dword [eax]
je 0x4879d1
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x48], 0
je 0x4879c9
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x48]
add eax, 8
cmp eax, dword [ebp + 0xc]
je 0x4879d1
or eax, 0xffffffff
jmp 0x487e12
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3c]
and edx, 0xfffffeff
mov eax, dword [ebp + 8]
mov dword [eax + 0x3c], edx
xor eax, eax
jmp 0x487e12
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
cmp edx, dword [ecx]
je 0x487a01
or eax, 0xffffffff
jmp 0x487e12
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3c]
and ecx, 0xfffffeff
mov edx, dword [ebp + 8]
mov dword [edx + 0x3c], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3c]
and ecx, 0x200
je 0x487a91
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3c]
and eax, 0xfffffdff
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x3c], eax
cmp dword [ebp + 0x10], 0
jbe 0x487a69
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
push ecx
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x16]
push eax
call dword [sym.imp.MSVCR90.dll__read]
add esp, 0xc
mov dword [ebp - 0x14], eax
xor ecx, ecx
cmp dword [ebp - 0x14], 0
setl cl
sub ecx, 1
and ecx, dword [ebp - 0x14]
mov dword [ebp + 0x10], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x18]
add eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0xc], eax
mov edx, dword [ebp + 0x10]
xor eax, eax
mov ecx, dword [ebp + 8]
add edx, dword [ecx + 0x30]
mov ecx, dword [ecx + 0x34]
adc ecx, eax
mov eax, dword [ebp + 8]
mov dword [eax + 0x30], edx
mov dword [eax + 0x34], ecx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
add edx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
mov dword [eax], edx
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
mov dword [ecx + 8], eax
mov eax, dword [ebp + 0x10]
jmp 0x487e12
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
mov dword [ebp - 8], edx
jmp 0x487acf
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3c]
and ecx, 0xffffffdf
mov edx, dword [ebp + 8]
mov dword [edx + 0x3c], ecx
mov eax, dword [ebp - 0x10]
neg eax
sbb eax, eax
and eax, 0x20
or eax, 0x18
not eax
mov ecx, dword [ebp + 8]
and eax, dword [ecx + 0x3c]
cmp eax, 1
je 0x487b27
mov edx, dword [ebp - 0x10]
push edx
push 1
mov eax, dword [ebp + 8]
push eax
call fcn.0042ef10
add esp, 0xc
test eax, eax
jge 0x487b27
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp - 0xc]
jbe 0x487b12
mov edx, dword [ebp - 8]
sub edx, dword [ebp - 0xc]
mov dword [ebp - 0x18], edx
jmp 0x487b19
mov dword [ebp - 0x18], 0xffffffff
mov eax, dword [ebp - 0x18]
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 0x10]
jmp 0x487e12
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3c]
or edx, 0x20
mov eax, dword [ebp + 8]
mov dword [eax + 0x3c], edx
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x18]
mov dword [ecx + 4], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
mov dword [ecx + 8], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov eax, dword [ecx + 0xc]
sub eax, dword [edx]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jle 0x487baf
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [ebp + 0x10]
jle 0x487b70
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 8]
cmp ecx, dword [eax]
je 0x487b90
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
mov edx, dword [ebp - 8]
push edx
call sub.MSVCR90.dll_memcpy
add esp, 0xc
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
add ecx, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
mov dword [edx], ecx
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x14]
mov dword [ebp - 8], eax
mov ecx, dword [ebp + 0x10]
sub ecx, dword [ebp - 0x14]
mov dword [ebp + 0x10], ecx
cmp dword [ebp + 0x10], 0
ja 0x487bba
jmp 0x487d43
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x14]
and eax, 4
jne 0x487d02
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + 0x3a]
and edx, 1
jne 0x487d02
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x18]
mov dword [eax + 0xc], edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xc]
mov dword [eax], edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
cmp ecx, dword [eax + 0x1c]
jge 0x487c3f
cmp dword [ebp + 0x10], 0x400
jb 0x487c19
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x1c]
cdq
and edx, 0xf
add eax, edx
sar eax, 4
cmp dword [ebp + 0x10], eax
jge 0x487c3f
mov eax, dword [ebp + 8]
movzx ecx, word [eax + 0x14]
and ecx, 0x40
je 0x487c47
mov edx, dword [ebp + 8]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x1c]
cmp dword [eax + 0x2c], 0
jg 0x487c47
jl 0x487c3f
mov ecx, dword [ebp - 0x1c]
cmp dword [ecx + 0x28], 0
jae 0x487c47
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x14], edx
jmp 0x487c7a
cmp dword [ebp - 4], 0
je 0x487c71
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
cmp ecx, dword [eax + 0x60]
ja 0x487c71
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov ecx, dword [edx + 0x60]
cmp ecx, dword [eax + 0x1c]
ja 0x487c71
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x60]
mov dword [ebp - 0x14], eax
jmp 0x487c7a
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x1c]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp + 0x10]
jle 0x487c9e
mov eax, dword [ebp - 0x14]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov ecx, dword [ebp - 0x14]
sub ecx, eax
cmp ecx, dword [ebp + 0x10]
jg 0x487c9e
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp + 0x10]
jne 0x487cfe
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3c]
or edx, 0x8000
mov eax, dword [ebp + 8]
mov dword [eax + 0x3c], edx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x40]
push edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004302e0
add esp, 0x10
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jl 0x487cfe
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x14]
mov dword [ebp - 8], eax
mov ecx, dword [ebp + 0x10]
sub ecx, dword [ebp - 0x14]
mov dword [ebp + 0x10], ecx
cmp dword [ebp - 0x14], 0
je 0x487cfa
cmp dword [ebp + 0x10], 0
jne 0x487cfc
jmp 0x487d43
jmp 0x487d00
jmp 0x487d02
jmp 0x487d3e
cmp dword [ebp - 4], 0
je 0x487d19
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x3a]
or eax, 0x20
mov ecx, dword [ebp + 8]
mov word [ecx + 0x3a], ax
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3c]
or eax, 0x8000
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x3c], eax
push 0xffffffffffffffff
mov edx, dword [ebp + 8]
push edx
call fcn.0042a0b0
add esp, 8
test eax, eax
jg 0x487d3e
jmp 0x487d43
jmp 0x487ac0
cmp dword [ebp - 0x10], 0
je 0x487d55
mov dword [ebp - 0x20], 0
jmp 0x487e06
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3c]
and ecx, 0xffffffc7
mov edx, dword [ebp + 8]
mov dword [edx + 0x3c], ecx
mov eax, dword [ebp + 8]
cmp dword [eax + 0x3c], 1
jne 0x487d9e
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + 0x14]
and edx, 0
je 0x487d84
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
mov dword [ebp - 0x24], ecx
jmp 0x487d8d
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x24]
mov dword [ecx + 8], edx
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x28], eax
jmp 0x487dff
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x3c], 2
jne 0x487dd8
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x14]
and eax, 0x20
je 0x487dbe
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x18]
mov dword [ebp - 0x2c], edx
jmp 0x487dc7
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x2c]
mov dword [edx + 4], eax
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x30], ecx
jmp 0x487df9
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
mov dword [edx + 8], ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
mov dword [edx + 4], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x20], 0
mov edx, dword [ebp - 8]
sub edx, dword [ebp - 0xc]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x14]
mov esp, ebp
pop ebp
ret