Function at 0x489130
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
cmp dword [ebp + 8], 0
push ebx
push esi
push edi
mov esi, eax
mov dword [ebp - 0xc], 0
jbe 0x489c9d
lea esp, [esp]
mov eax, dword [ebp + 0xc]
inc dword [eax]
mov eax, dword [ebp - 0xc]
shl eax, 5
lea eax, [eax + esi + 0xd8]
mov dword [esi + 0x8d8], eax
mov ebx, dword [eax]
add ebx, dword [esi + 0x10914]
mov edi, ebx
and edi, 0x80001fff
jns 0x489182
dec edi
or edi, 0xffffe000
inc edi
mov eax, ebx
sub eax, edi
mov dword [ebp - 8], eax
test ebx, ebx
jns 0x48927e
mov ecx, dword [esi + 0x10904]
push 0x401
push 0x53b1a8
push ecx
lea edi, [esi + 0x8dc]
push 0x53ad84
push edi
call fcn.00494428
mov edx, dword [esi + 0x10b54]
add esp, 0x10
push eax
push edi
push esi
call edx
mov eax, dword [ebp + 0xc]
cmp dword [eax], 1
mov dword [ebp + 0x20], 2
jne 0x48926f
cmp dword [esi + 0x10914], 0
je 0x48926f
push 0x401
push 0x53a014
lea edi, [esi + 0x8dc]
push edi
call fcn.00494428
mov ecx, dword [esi + 0x10b54]
add esp, 8
push eax
push edi
push esi
call ecx
mov edx, dword [esi + 0x10914]
mov ecx, dword [esi + 0x8d8]
mov eax, dword [ebp + 0x14]
mov dword [esi + 0x10914], 0
mov ebx, dword [ecx]
mov edi, ebx
and edi, 0x80001fff
mov dword [eax], edx
jns 0x489234
dec edi
or edi, 0xffffe000
inc edi
mov eax, ebx
sub eax, edi
mov dword [ebp - 8], eax
test ebx, ebx
jns 0x48927b
mov edx, dword [esi + 0x10904]
push 0x401
push 0x53b1a8
push edx
push 0x53ad84
lea edi, [esi + 0x8dc]
push edi
call fcn.00494428
add esp, 0x10
push eax
mov eax, dword [esi + 0x10b54]
push edi
push esi
call eax
mov dword [ebp + 0x20], 3
jmp 0x489c8d
mov eax, dword [ebp - 8]
cmp eax, dword [esi + 0x10910]
je 0x489321
mov ecx, dword [ebp - 8]
mov edx, dword [esi + 0x10908]
push 0
push ecx
push edx
call fcn.004b6ba2
mov ecx, dword [esi + 0x10908]
add esp, 0xc
mov dword [esi + 0x10910], eax
mov eax, dword [esi + 0x108e4]
push 0x2000
push eax
push ecx
call fcn.004b6a37
add esp, 0xc
mov dword [esi + 0x108ec], eax
test eax, eax
jg 0x489309
mov edx, dword [ebp - 8]
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push 0x401
push edx
push 0x54a18c
push ecx
lea edi, [esi + 0x8dc]
push 0x539f14
push edi
call fcn.00494428
mov edx, dword [esi + 0x10b54]
add esp, 0x14
push eax
push edi
push esi
call edx
mov dword [ebp + 0x20], 3
jmp 0x489c8d
mov ecx, dword [esi + 0x108e4]
add ecx, edi
sub eax, edi
mov dword [esi + 0x108e8], ecx
mov dword [esi + 0x108ec], eax
jmp 0x48933f
mov eax, dword [esi + 0x108e4]
mov edx, dword [esi + 0x108e8]
sub edx, eax
sub edx, edi
add dword [esi + 0x108ec], edx
add eax, edi
mov dword [esi + 0x108e8], eax
lea edi, [esi + 0xc8]
push edi
mov eax, 4
call fcn.00483a30
add esp, 4
test eax, eax
jne 0x489393
lea edi, [esi + 0x8dc]
push 0x401
push ebx
push 0x54a194
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push ecx
push 0x539f14
push edi
call fcn.00494428
mov edx, dword [esi + 0x10b54]
add esp, 0x14
push eax
push edi
push esi
call edx
mov dword [ebp + 0x20], 3
jmp 0x489c8d
push 4
push 0x55373c
push edi
call fcn.004945e1
add esp, 0xc
test eax, eax
je 0x4894bb
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push 0x401
push ebx
push 0x539f54
push ecx
lea edi, [esi + 0x8dc]
push 0x539f14
push edi
call fcn.00494428
mov edx, dword [esi + 0x10b54]
add esp, 0x14
push eax
push edi
push esi
call edx
mov eax, dword [ebp + 0xc]
cmp dword [eax], 1
mov dword [ebp + 0x20], 2
jne 0x4893f5
cmp dword [esi + 0x10914], 0
jne 0x48940e
jmp 0x489402
cmp dword [esi + 0x10914], 0
jne 0x489c8d
mov ecx, dword [ebp + 0x14]
cmp dword [ecx], 0
je 0x489c8d
push 0x401
push 0x53a014
push edi
call fcn.00494428
mov edx, dword [esi + 0x10b54]
add esp, 8
push eax
push edi
push esi
call edx
mov eax, dword [esi + 0x10914]
test eax, eax
je 0x489447
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov dword [esi + 0x10914], 0
jmp 0x489452
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
mov dword [esi + 0x10914], eax
mov ecx, dword [esi + 0x8d8]
mov edx, dword [ecx]
push edx
call fcn.00483c50
add esp, 4
test eax, eax
jne 0x4894ad
lea eax, [esi + 0xc8]
push eax
mov eax, 4
call fcn.00483a30
add esp, 4
test eax, eax
je 0x48935d
push 4
lea eax, [esi + 0xc8]
push 0x55373c
push eax
call fcn.004945e1
add esp, 0xc
test eax, eax
je 0x4894bb
push 0x401
push ebx
push 0x539f54
jmp 0x489368
cmp eax, 3
je 0x489387
jmp 0x48935d
mov ecx, esi
call fcn.00483340
mov ebx, eax
test ebx, ebx
je 0x4894fa
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push 0x421
push ecx
lea edi, [esi + 0x8dc]
push 0x539ff4
push edi
call fcn.00494428
mov edx, dword [esi + 0x10b54]
add esp, 0xc
push eax
push edi
push esi
call edx
mov dword [ebp + 0x20], ebx
jmp 0x489c8d
movzx edi, word [esi + 0x10936]
xor eax, eax
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], eax
cmp edi, eax
je 0x489710
cmp edi, 0x104
jb 0x489557
push 0x401
lea ebx, [esi + 0x8dc]
push 0x53a7b8
push ebx
call fcn.00494428
add esp, 8
push eax
mov eax, dword [esi + 0x10b54]
push ebx
push esi
call eax
add edi, 0xfffffefd
mov dword [ebp - 8], edi
mov edi, 0x103
mov dword [ebp - 0x14], 1
mov dword [ebp - 0x10], edi
jmp 0x48955a
mov dword [ebp - 8], eax
lea ebx, [esi + 0x109f0]
push ebx
mov eax, edi
call fcn.00483a30
add esp, 4
test eax, eax
jne 0x489579
mov eax, 0x33
jmp 0x4896c3
mov byte [ebx + edi], 0
mov eax, dword [esi + 0x8d8]
mov cl, byte [eax + 0x13]
test cl, cl
jne 0x48959c
mov dl, byte [eax + 0x12]
cmp dl, 0x19
je 0x48959c
cmp dl, 0x1a
je 0x48959c
cmp dl, 0x28
jne 0x4895b0
cmp cl, 6
je 0x4895b0
cmp cl, 0xb
jne 0x4895b8
cmp byte [eax + 0x12], 0x32
jne 0x4895b8
lea esp, [esp]
push ebx
push ebx
call dword [0x4fb69c]
mov ecx, dword [esi + 0x8d8]
test byte [ecx + 0x18], 0x10
je 0x48962c
lea edi, [esi + 0x109f0]
mov ebx, edi
mov al, byte [ebx]
mov byte [ebp - 1], al
test al, al
je 0x489626
call fcn.004b0f5c
push eax
push ebx
call fcn.004ee79a
add esp, 8
cmp eax, 1
jbe 0x4895fb
test eax, eax
je 0x48961d
lea ecx, [ecx]
mov dl, byte [ebx]
mov byte [edi], dl
inc edi
inc ebx
dec eax
jne 0x4895f0
jmp 0x48961d
movsx eax, byte [ebp - 1]
push eax
call fcn.00497c8c
add esp, 4
test eax, eax
movsx eax, byte [ebp - 1]
je 0x489619
push eax
call fcn.004969ab
add esp, 4
mov byte [edi], al
inc edi
inc ebx
mov al, byte [ebx]
mov byte [ebp - 1], al
test al, al
jne 0x4895d5
mov byte [edi], 0
mov edi, dword [ebp - 0x10]
mov eax, dword [esi + 0x8d8]
test byte [eax + 0x18], 0x20
je 0x48965c
cmp edi, 8
jbe 0x48965c
cmp byte [esi + 0x109f8], 0x2e
lea eax, [esi + 0x109f8]
jne 0x48965c
cmp byte [eax], 0
je 0x48965c
mov cl, byte [eax + 1]
inc eax
mov byte [eax - 1], cl
test cl, cl
jne 0x489651
cmp dword [ebp - 8], 0
je 0x4896bc
push 0x401
lea ebx, [esi + 0x88dc]
lea eax, [esi + 0x109f0]
lea edi, [esi + 0x8dc]
call fcn.0048b340
push eax
push 0x549db4
push edi
call fcn.00494428
mov edx, dword [esi + 0x10b54]
add esp, 0xc
push eax
push edi
push esi
call edx
mov eax, dword [esi + 0x108e8]
sub eax, dword [esi + 0x10914]
sub eax, dword [esi + 0x108e4]
add eax, dword [esi + 0x10910]
add eax, dword [ebp - 8]
push eax
call fcn.00483c50
add esp, 4
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x489710
cmp eax, dword [ebp + 0x20]
jle 0x4896cb
mov dword [ebp + 0x20], eax
cmp eax, 1
jle 0x489710
push 0x401
push 0x54a198
lea ebx, [esi + 0x88dc]
lea eax, [esi + 0x109f0]
lea edi, [esi + 0x8dc]
call fcn.0048b340
push eax
push 0x539dd4
push edi
call fcn.00494428
mov ecx, dword [esi + 0x10b54]
add esp, 0x10
push eax
push edi
push esi
call ecx
jmp 0x489c8d
mov edx, dword [esi + 0x8d8]
mov eax, dword [edx + 0x1c]
test eax, eax
je 0x4897e6
lea ecx, [esi + 0x109f0]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x489747
test dl, dl
je 0x489743
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x489747
add eax, 2
add ecx, 2
test dl, dl
jne 0x489727
xor eax, eax
jmp 0x48974c
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4897c7
push 0x401
lea ebx, [esi + 0x88dc]
lea eax, [esi + 0x109f0]
lea edi, [esi + 0x8dc]
call fcn.0048b340
push eax
mov eax, dword [esi + 0x8d8]
mov eax, dword [eax + 0x1c]
lea ebx, [esi + 0xc8dc]
call fcn.0048b340
push eax
push 0x539e30
push edi
call fcn.00494428
mov ecx, dword [esi + 0x10b54]
add esp, 0x10
push eax
push edi
push esi
call ecx
mov edx, dword [esi + 0x8d8]
mov ecx, dword [edx + 0x1c]
lea edx, [esi + 0x109f0]
lea ebx, [ebx]
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x4897b0
cmp dword [ebp + 0x20], 1
jge 0x4897c7
mov dword [ebp + 0x20], 1
mov eax, dword [esi + 0x8d8]
mov ecx, dword [eax + 0x1c]
push ecx
call fcn.00495660
mov edx, dword [esi + 0x8d8]
add esp, 4
mov dword [edx + 0x1c], 0
cmp word [esi + 0x10934], 0
jne 0x489863
mov eax, dword [esi + 0x8d8]
test byte [eax + 0x18], 1
mov ecx, dword [esi + 0x10920]
mov dword [ebp - 0x14], ecx
je 0x48980b
sub ecx, 0xc
mov dword [ebp - 0x14], ecx
mov eax, dword [esi + 0x10924]
cmp eax, ecx
je 0x489863
push 0x401
push ecx
push eax
lea ebx, [esi + 0x88dc]
lea eax, [esi + 0x109f0]
lea edi, [esi + 0x8dc]
call fcn.0048b340
push eax
push 0x539e90
push edi
call fcn.00494428
mov ecx, dword [esi + 0x10b54]
add esp, 0x14
push eax
push edi
push esi
call ecx
cmp dword [ebp + 0x20], 1
mov edx, dword [ebp - 0x14]
mov dword [esi + 0x10924], edx
jge 0x489863
mov dword [ebp + 0x20], 1
mov eax, dword [esi + 0x10918]
test eax, eax
je 0x489880
push eax
call fcn.00495660
add esp, 4
mov dword [esi + 0x10918], 0
movzx edi, word [esi + 0x10938]
test edi, edi
je 0x4898fd
mov eax, dword [esi + 0x10918]
test eax, eax
je 0x48989e
push eax
call fcn.00495660
add esp, 4
push edi
call fcn.0049574c
add esp, 4
mov dword [esi + 0x10918], eax
test eax, eax
jne 0x48997f
push 0x401
push edi
lea ebx, [esi + 0x8dc]
push 0x53a7e4
push ebx
call fcn.00494428
add esp, 0xc
push eax
mov eax, dword [esi + 0x10b54]
push ebx
push esi
call eax
mov ecx, dword [esi + 0x108e8]
sub ecx, dword [esi + 0x10914]
sub ecx, dword [esi + 0x108e4]
add ecx, dword [esi + 0x10910]
add ecx, edi
push ecx
call fcn.00483c50
add esp, 4
mov eax, dword [esi + 0x8d8]
test byte [eax + 0x18], 1
je 0x489a22
mov edx, dword [esi + 8]
mov ecx, esi
call fcn.00490890
test eax, eax
je 0x489a22
cmp eax, 1
jne 0x4899df
mov eax, dword [esi + 0x44]
test eax, eax
je 0x489939
cmp dword [esi + 0x38], 0
jne 0x489975
test eax, eax
jne 0x48993f
cmp dword [esi + 0x38], 0
jne 0x489975
push 0x401
lea ebx, [esi + 0x88dc]
lea eax, [esi + 0x109f0]
lea edi, [esi + 0x8dc]
call fcn.0048b340
push eax
push 0x53a25c
push edi
call fcn.00494428
mov ecx, dword [esi + 0x10b54]
add esp, 0xc
push eax
push edi
push esi
call ecx
mov eax, dword [ebp + 0x10]
inc dword [eax]
jmp 0x489c8d
push eax
mov eax, edi
call fcn.00483a30
add esp, 4
test eax, eax
jne 0x4898fd
mov eax, 0x33
cmp dword [ebp + 0x20], eax
jge 0x48999f
mov dword [ebp + 0x20], eax
push 0x401
push 0x54a198
lea ebx, [esi + 0x88dc]
lea eax, [esi + 0x109f0]
lea edi, [esi + 0x8dc]
call fcn.0048b340
push eax
push 0x539ef0
push edi
call fcn.00494428
mov edx, dword [esi + 0x10b54]
add esp, 0x10
push eax
push edi
push esi
call edx
jmp 0x489c8d
cmp eax, dword [ebp + 0x20]
jle 0x4899e7
mov dword [ebp + 0x20], eax
push 0x401
lea ebx, [esi + 0x88dc]
lea eax, [esi + 0x109f0]
lea edi, [esi + 0x8dc]
call fcn.0048b340
push eax
push 0x53a230
push edi
call fcn.00494428
mov edx, dword [esi + 0x10b54]
add esp, 0xc
push eax
push edi
push esi
call edx
jmp 0x489c8d
cmp dword [esi + 0x44], 0
jne case.0x489be0.101
cmp dword [esi + 0x14], 0
jne case.0x489be0.101
cmp dword [esi + 0xa0], 0
jne case.0x489be0.101
mov dword [ebp - 8], 0
lea ebx, [ebx]
mov eax, dword [esi + 0x8d8]
cmp byte [eax + 0x13], 0
jne 0x489ad5
lea edi, [esi + 0x109f0]
push 0x2f
push edi
call fcn.00496872
add esp, 8
test eax, eax
jne 0x489ad5
cmp byte [edi], al
je 0x489ad5
cmp byte [edi], 0x5c
jne 0x489ac5
cmp dword [esi + 0x109bc], 0
jne 0x489ac2
mov ecx, dword [esi + 0x10904]
push 0x21
push ecx
lea ebx, [esi + 0x8dc]
push 0x53a038
push ebx
call fcn.00494428
mov edx, dword [esi + 0x10b54]
add esp, 0xc
push eax
push ebx
push esi
call edx
cmp dword [ebp + 0x20], 0
mov dword [esi + 0x109bc], 1
jne 0x489ac2
mov dword [ebp + 0x20], 1
mov byte [edi], 0x2f
push edi
call fcn.004ef726
mov edi, eax
add esp, 4
cmp byte [edi], 0
jne 0x489a75
cmp dword [ebp - 8], 0
jne 0x489b49
cmp byte [esi + 0x109f0], 0x2f
jne 0x489b49
push 0x401
lea ebx, [esi + 0x88dc]
lea eax, [esi + 0x109f0]
lea edi, [esi + 0x8dc]
call fcn.0048b340
push eax
push 0x53a074
push edi
call fcn.00494428
add esp, 0xc
push eax
mov eax, dword [esi + 0x10b54]
push edi
push esi
call eax
cmp dword [ebp + 0x20], 0
jne 0x489b30
mov dword [ebp + 0x20], 1
jmp 0x489b30
lea eax, [esi + 0x109f1]
mov cl, byte [eax]
mov byte [eax - 1], cl
inc eax
test cl, cl
jne 0x489b36
cmp byte [esi + 0x109f0], 0x2f
je 0x489b30
mov ecx, dword [ebp - 8]
push ecx
mov ecx, esi
call fcn.00486270
mov ecx, eax
add esp, 4
and ecx, 0xffff80ff
je 0x489b69
cmp dword [ebp + 0x20], ecx
jge 0x489b69
mov dword [ebp + 0x20], ecx
and eax, 0x7f00
cmp eax, 0x100
jg 0x489ca7
lea edi, [esi + 0x109f0]
push edi
mov eax, esi
call fcn.004846c0
add esp, 4
cmp eax, 0xffffffff
je 0x489bf3
test eax, eax
je 0x489bb0
cmp eax, 1
jne case.0x489be0.101
mov eax, dword [esi + 0x78]
cmp eax, 2
je case.0x489be0.100
cmp dword [esi + 0x4c], 0
je 0x489bbc
cmp dword [ebp - 8], 0
jmp 0x489bb6
mov eax, dword [esi + 0x78]
cmp eax, 2
je case.0x489be0.100
cmp eax, 1
je case.0x489be0.101
mov edx, dword [esi + 0x10b68]
mov eax, dword [edx + 8]
test eax, eax
je 0x489bd3
push edi
call eax
jmp 0x489bd8
mov eax, 0x68
add eax, 0xffffff9c
cmp eax, 5
ja case.0x489be0.101
jmp dword [eax*4 + 0x489dfc]
mov dword [ebp - 8], 1
jmp 0x489a50
cmp dword [esi + 0x1c], 0
je case.0x489be0.101
cmp dword [ebp - 8], 0
je 0x489c8d
mov eax, dword [esi + 0x10b64]
test eax, eax
je 0x489c2a
mov edx, dword [esi + 0x10904]
push 0
lea ecx, [esi + 0x109f0]
push ecx
push edx
push 1
push esi
call eax
test eax, eax
jne 0x489de7
mov eax, esi
mov dword [esi + 0x109c0], 0
call fcn.00489e20
test eax, eax
je 0x489c61
mov ecx, dword [ebp + 0x20]
cmp eax, ecx
jle 0x489c4b
mov ecx, eax
mov dword [ebp + 0x20], ecx
cmp dword [esi + 0x109c0], 1
jg 0x489df3
cmp ecx, 0x50
je 0x489df3
mov eax, dword [esi + 0x10b64]
test eax, eax
je 0x489c8d
lea ecx, [esi + 0x10924]
push ecx
mov ecx, dword [esi + 0x10904]
lea edx, [esi + 0x109f0]
push edx
push ecx
push 3
push esi
call eax
test eax, eax
jne 0x489de7
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
cmp eax, dword [ebp + 8]
jb 0x489150
mov eax, dword [ebp + 0x20]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 0x1000
jne 0x489d09
lea eax, [ebp - 0x18]
push eax
push esi
call fcn.004857e0
mov ecx, dword [ebp - 0x18]
add esp, 8
test ecx, ecx
jne 0x489cf9
test eax, eax
je 0x489c8d
push 0x401
lea edi, [esi + 0x8dc]
push 0x53a0c8
push edi
call fcn.00494428
mov ecx, dword [esi + 0x10b54]
add esp, 8
push eax
push edi
push esi
call ecx
cmp dword [ebp + 0x20], 0
jne 0x489c8d
mov dword [ebp + 0x20], 1
jmp 0x489c8d
mov eax, dword [ebp + 0x1c]
mov edx, dword [eax]
mov dword [eax], ecx
mov eax, dword [ebp + 0x18]
inc dword [eax]
mov dword [ecx], edx
jmp 0x489c8d
cmp eax, 0x1100
jne 0x489d5c
cmp dword [esi + 0x40], 0
mov eax, 0x54a1a0
jne 0x489d20
mov eax, 0x53c84c
push 0x401
push eax
lea ebx, [esi + 0x88dc]
lea eax, [esi + 0x109f0]
lea edi, [esi + 0x8dc]
call fcn.0048b340
push eax
push 0x53a0a4
push edi
call fcn.00494428
add esp, 0x10
push eax
mov eax, dword [esi + 0x10b54]
push edi
push esi
call eax
jmp 0x489c8d
cmp eax, 0x200
jle 0x489c8d
cmp dword [ebp + 0x20], 2
jge 0x489c8d
mov dword [ebp + 0x20], 2
jmp 0x489c8d
mov dword [esi + 0x78], 1
jmp case.0x489be0.101
mov dword [esi + 0x78], 2
cmp dword [esi + 0x78], 2
je 0x489da9
cmp dword [esi + 0x4c], 0
je 0x489da9
cmp dword [ebp - 8], 0
mov dword [ebp - 0x14], 0x54a1d0
je 0x489db0
mov dword [ebp - 0x14], 0x54a1ac
push 0
lea ebx, [esi + 0x88dc]
lea eax, [esi + 0x109f0]
lea edi, [esi + 0x8dc]
call fcn.0048b340
mov ecx, dword [ebp - 0x14]
push eax
push ecx
push edi
call fcn.00494428
mov edx, dword [esi + 0x10b54]
add esp, 0xc
push eax
push edi
push esi
call edx
jmp 0x489c8d
mov eax, 0x50
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, ecx
pop ebx
mov esp, ebp
pop ebp
ret