Function at 0x46b540
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x3c
push ebx
push ebp
push esi
mov esi, dword [esp + 0x4c]
push edi
xor edi, edi
lea eax, [esi + 0xd4]
mov dword [esp + 0x30], edi
mov dword [esi + 0x8d4], eax
mov dword [esi + 0x7c], 1
mov dword [esi + 0xc9a8], edi
mov eax, dword [esi + 0x64]
cmp eax, edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x24], edi
jbe 0x46b5b9
shl eax, 2
push eax
call fcn.0046fea8
mov ecx, eax
add esp, 4
cmp ecx, edi
mov dword [esp + 0x14], ecx
je 0x46b5b9
mov edx, dword [esi + 0x64]
xor eax, eax
cmp edx, edi
jbe 0x46b5b9
mov dword [ecx], edi
mov edx, dword [esi + 0x64]
inc eax
add ecx, 4
cmp eax, edx
jb 0x46b5ac
mov eax, dword [esi + 0x68]
cmp eax, edi
jbe 0x46b5f0
lea ecx, [eax*4]
push ecx
call fcn.0046fea8
mov ecx, eax
add esp, 4
cmp ecx, edi
mov dword [esp + 0x1c], ecx
je 0x46b5f0
mov edx, dword [esi + 0x68]
xor eax, eax
cmp edx, edi
jbe 0x46b5f0
mov dword [ecx], edi
mov edx, dword [esi + 0x68]
inc eax
add ecx, 4
cmp eax, edx
jb 0x46b5e3
mov dword [esp + 0x28], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x50], edi
lea ebx, [esi + 0xd4]
lea edi, [esi + 0xc4]
push 4
push edi
push esi
mov dword [esi + 0x8d4], ebx
call fcn.00467010
add esp, 0xc
test eax, eax
je 0x46b7c5
push 4
push 0x497bc0
push edi
call fcn.00470230
add esp, 0xc
test eax, eax
jne 0x46b7cf
push esi
call fcn.00466710
add esp, 4
test eax, eax
jne 0x46b803
xor edx, edx
push 2
mov dx, word [esi + 0xc950]
push edx
push esi
call fcn.004677e0
mov edi, dword [esp + 0x1c]
add esp, 0xc
test eax, eax
je 0x46b67f
cmp eax, edi
jle 0x46b676
mov edi, eax
mov dword [esp + 0x10], edi
cmp eax, 1
jg 0x46b807
xor eax, eax
push 3
mov ax, word [esi + 0xc952]
push eax
push esi
call fcn.004677e0
add esp, 0xc
test eax, eax
je 0x46b6ab
cmp eax, edi
jle 0x46b6a2
mov edi, eax
mov dword [esp + 0x10], edi
cmp eax, 1
jg 0x46b807
xor ecx, ecx
push 0
mov cx, word [esi + 0xc954]
push ecx
push esi
call fcn.004677e0
add esp, 0xc
test eax, eax
je 0x46b6d5
cmp eax, edi
jle 0x46b6cc
mov dword [esp + 0x10], eax
cmp eax, 1
jg 0x46b807
mov eax, dword [esi + 0x6c]
test eax, eax
je 0x46b6fe
push esi
call fcn.0046bfe0
add esp, 4
test eax, eax
je 0x46b7a9
mov ecx, dword [esp + 0x50]
inc ecx
add ebx, 0x20
mov dword [esp + 0x50], ecx
jmp 0x46b7ad
mov eax, dword [esi + 0x64]
test eax, eax
je 0x46b749
xor edi, edi
test eax, eax
jbe 0x46b7ad
lea ebp, [esi + 0xc9dc]
mov eax, dword [esi + 0xbc]
mov edx, dword [esi + 0x18]
push edx
mov ecx, dword [eax + edi*4]
push ecx
push ebp
call fcn.00467d80
add esp, 0xc
test eax, eax
jne 0x46b73a
mov eax, dword [esi + 0x64]
inc edi
cmp edi, eax
jb 0x46b715
jmp 0x46b7ad
mov eax, dword [esp + 0x14]
test eax, eax
je 0x46b749
mov dword [eax + edi*4], 1
mov eax, dword [esi + 0x68]
xor edi, edi
test eax, eax
jbe 0x46b77b
lea ebp, [esi + 0xc9dc]
mov eax, dword [esi + 0xc0]
mov edx, dword [esi + 0x18]
push edx
mov ecx, dword [eax + edi*4]
push ecx
push ebp
call fcn.00467d80
add esp, 0xc
test eax, eax
jne 0x46b796
mov eax, dword [esi + 0x68]
inc edi
cmp edi, eax
jb 0x46b758
push esi
call fcn.0046bfe0
add esp, 4
test eax, eax
je 0x46b7a9
mov ecx, dword [esp + 0x50]
inc ecx
add ebx, 0x20
mov dword [esp + 0x50], ecx
jmp 0x46b7ad
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x46b7ad
mov edx, eax
mov dword [edx + edi*4], 1
jmp 0x46b7ad
inc dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x50]
inc ecx
cmp eax, 0x40
mov dword [esp + 0x28], ecx
jb 0x46b606
jmp 0x46b80f
mov dword [esp + 0x10], 0x33
jmp 0x46b807
mov ax, word [esp + 0x28]
cmp ax, word [esi + 0xc96a]
jne 0x46b7f9
push 4
push 0x497bc8
push edi
call fcn.00470230
add esp, 0xc
neg eax
sbb eax, eax
neg eax
mov dword [esp + 0x3c], eax
jmp 0x46b807
mov dword [esp + 0x10], 3
jmp 0x46b807
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], 1
mov eax, dword [esi + 0xc8e8]
mov ecx, dword [esi + 0xc90c]
mov edx, dword [esi + 0xc8e4]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x40], ecx
test eax, eax
mov dword [esp + 0x44], edx
mov dword [esp + 0x2c], 0
jbe 0x46bdbd
mov ecx, dword [esp + 0x2c]
mov ebp, dword [esi + 0xc910]
shl ecx, 5
mov ebx, dword [esp + 0x30]
lea edx, [ecx + esi + 0xd4]
mov ecx, ebp
mov dword [esi + 0x8d4], edx
inc ebx
mov eax, dword [edx]
mov dword [esp + 0x30], ebx
add ecx, eax
mov edi, ecx
and edi, 0x80001fff
jns 0x46b87c
dec edi
or edi, 0xffffe000
inc edi
mov eax, ecx
sub eax, edi
test ecx, ecx
jge 0x46b8d4
cmp ebx, 1
mov dword [esp + 0x10], 2
jne 0x46bad2
test ebp, ebp
je 0x46bad2
mov dword [esi + 0xc910], 0
mov edx, dword [edx]
mov edi, edx
mov dword [esp + 0x24], ebp
and edi, 0x80001fff
jns 0x46b8bf
dec edi
or edi, 0xffffe000
inc edi
mov eax, edx
sub eax, edi
test edx, edx
jge 0x46b8d4
mov dword [esp + 0x10], 3
jmp case.0x46bcbf.100
cmp eax, dword [esi + 0xc90c]
je 0x46b93d
mov edx, dword [esi + 0xc904]
push 0
push eax
push edx
call fcn.0047960b
mov ecx, dword [esi + 0xc904]
mov dword [esi + 0xc90c], eax
mov eax, dword [esi + 0xc8e0]
push 0x2000
push eax
push ecx
call fcn.0047abb6
add esp, 0x18
mov dword [esi + 0xc8e8], eax
test eax, eax
jg 0x46b923
mov dword [esp + 0x10], 3
jmp case.0x46bcbf.100
mov ebp, dword [esi + 0xc8e0]
mov edx, edi
add edx, ebp
sub eax, edi
mov dword [esi + 0xc8e4], edx
mov dword [esi + 0xc8e8], eax
jmp 0x46b963
mov eax, dword [esi + 0xc8e0]
mov ecx, dword [esi + 0xc8e4]
mov edx, dword [esi + 0xc8e8]
sub ecx, eax
sub ecx, edi
add edx, ecx
add eax, edi
mov dword [esi + 0xc8e8], edx
mov dword [esi + 0xc8e4], eax
lea ebp, [esi + 0xc4]
push 4
push ebp
push esi
call fcn.00467010
add esp, 0xc
test eax, eax
jne 0x46b986
mov dword [esp + 0x10], 3
jmp case.0x46bcbf.100
push 4
push 0x497bc4
push ebp
call fcn.00470230
add esp, 0xc
test eax, eax
je 0x46badf
cmp ebx, 1
mov dword [esp + 0x10], 2
jne 0x46b9b5
mov eax, dword [esi + 0xc910]
test eax, eax
jne 0x46b9d3
mov eax, dword [esi + 0xc910]
test eax, eax
jne case.0x46bcbf.100
mov ecx, dword [esp + 0x24]
test ecx, ecx
je case.0x46bcbf.100
test eax, eax
je 0x46b9e3
mov dword [esp + 0x24], eax
mov dword [esi + 0xc910], 0
jmp 0x46b9ed
mov edx, dword [esp + 0x24]
mov dword [esi + 0xc910], edx
mov eax, dword [esi + 0x8d4]
mov ecx, dword [esi + 0xc910]
mov eax, dword [eax]
add eax, ecx
mov edi, eax
and edi, 0x80001fff
jns 0x46ba0f
dec edi
or edi, 0xffffe000
inc edi
mov ecx, eax
sub ecx, edi
test eax, eax
jl 0x46be2c
cmp ecx, dword [esi + 0xc90c]
je 0x46ba7b
push 0
push ecx
mov ecx, dword [esi + 0xc904]
push ecx
call fcn.0047960b
mov edx, dword [esi + 0xc8e0]
mov dword [esi + 0xc90c], eax
mov eax, dword [esi + 0xc904]
push 0x2000
push edx
push eax
call fcn.0047abb6
add esp, 0x18
mov dword [esi + 0xc8e8], eax
test eax, eax
jle 0x46be39
mov edx, dword [esi + 0xc8e0]
mov ecx, edi
add ecx, edx
sub eax, edi
mov dword [esi + 0xc8e4], ecx
mov dword [esi + 0xc8e8], eax
jmp 0x46baa1
mov eax, dword [esi + 0xc8e0]
mov edx, dword [esi + 0xc8e4]
mov ecx, dword [esi + 0xc8e8]
sub edx, eax
sub edx, edi
add ecx, edx
add eax, edi
mov dword [esi + 0xc8e8], ecx
mov dword [esi + 0xc8e4], eax
push 4
push ebp
push esi
call fcn.00467010
add esp, 0xc
test eax, eax
jne 0x46babe
mov dword [esp + 0x10], 3
jmp case.0x46bcbf.100
push 4
push 0x497bc4
push ebp
call fcn.00470230
add esp, 0xc
test eax, eax
je 0x46badf
mov dword [esp + 0x10], 3
jmp case.0x46bcbf.100
push esi
call fcn.00466950
add esp, 4
test eax, eax
je 0x46baf5
mov dword [esp + 0x10], eax
jmp case.0x46bcbf.100
xor eax, eax
push 6
mov ax, word [esi + 0xc934]
push eax
push esi
call fcn.004677e0
add esp, 0xc
test eax, eax
je 0x46bb21
cmp eax, dword [esp + 0x10]
jle 0x46bb18
mov dword [esp + 0x10], eax
cmp eax, 1
jg case.0x46bcbf.100
mov eax, dword [esi + 0xc914]
test eax, eax
je 0x46bb3e
push eax
call fcn.0046fd2e
add esp, 4
mov dword [esi + 0xc914], 0
xor ecx, ecx
push 3
mov cx, word [esi + 0xc936]
push ecx
push esi
call fcn.004677e0
add esp, 0xc
test eax, eax
je 0x46bb6a
cmp eax, dword [esp + 0x10]
jle 0x46bb61
mov dword [esp + 0x10], eax
cmp eax, 1
jg case.0x46bcbf.100
mov edx, dword [esi + 0x8d4]
test byte [edx + 0x1c], 1
je 0x46bba8
mov eax, dword [esi + 8]
push eax
push esi
call fcn.0046d2c0
add esp, 8
test eax, eax
je 0x46bba8
cmp eax, 1
jne 0x46bb95
inc dword [esp + 0x34]
jmp case.0x46bcbf.100
cmp eax, dword [esp + 0x10]
jle case.0x46bcbf.100
mov dword [esp + 0x10], eax
jmp case.0x46bcbf.100
mov eax, dword [esi + 0x44]
test eax, eax
jne case.0x46bcbf.101
mov eax, dword [esi + 0x14]
test eax, eax
jne case.0x46bcbf.101
mov eax, dword [esi + 0x9c]
test eax, eax
jne case.0x46bcbf.101
xor ebx, ebx
mov ecx, dword [esi + 0x8d4]
mov eax, dword [ecx + 0x14]
test eax, eax
jne 0x46bc34
lea edi, [esi + 0xc9dc]
push 0x2f
push edi
call fcn.00470f3e
add esp, 8
test eax, eax
jne 0x46bc34
mov eax, edi
mov cl, byte [eax]
test cl, cl
je 0x46bc34
mov edi, dword [esp + 0x10]
cmp cl, 0x5c
jne 0x46bc21
mov ecx, dword [esi + 0xc9a8]
test ecx, ecx
jne 0x46bc1e
test edi, edi
mov dword [esi + 0xc9a8], 1
jne 0x46bc1e
mov edi, 1
mov byte [eax], 0x2f
push eax
call fcn.00472893
mov cl, byte [eax]
add esp, 4
test cl, cl
jne 0x46bbfc
mov dword [esp + 0x10], edi
push ebx
push esi
call fcn.00468da0
add esp, 8
cmp eax, 1
jg 0x46bce0
lea edi, [esi + 0xc9dc]
push edi
push esi
call fcn.00467730
add esp, 8
cmp eax, 0xffffffff
je 0x46bcd0
test eax, eax
je 0x46bc8f
cmp eax, 1
jne case.0x46bcbf.101
mov eax, dword [esi + 0x70]
cmp eax, 2
je case.0x46bcbf.100
mov ecx, dword [esi + 0x4c]
test ecx, ecx
je 0x46bc84
test ebx, ebx
je case.0x46bcbf.100
cmp eax, 1
je case.0x46bcbf.101
jmp 0x46bca0
mov eax, dword [esi + 0x70]
cmp eax, 2
je case.0x46bcbf.100
cmp eax, 1
je case.0x46bcbf.101
mov edx, dword [esi + 0xcb28]
mov eax, dword [edx + 0xc]
test eax, eax
je 0x46bcb2
push edi
call eax
jmp 0x46bcb7
mov eax, 0x68
add eax, 0xffffff9c
cmp eax, 5
ja case.0x46bcbf.101
jmp dword [eax*4 + 0x46bfc0]
mov ebx, 1
jmp 0x46bbce
mov eax, dword [esi + 0x1c]
test eax, eax
je case.0x46bcbf.101
test ebx, ebx
jne case.0x46bcbf.101
jmp case.0x46bcbf.100
cmp eax, 0x4d
je case.0x46bcbf.100
cmp eax, 0x4e
je case.0x46bcbf.100
cmp eax, 2
jle case.0x46bcbf.100
cmp dword [esp + 0x10], 2
jge case.0x46bcbf.100
mov dword [esp + 0x10], 2
jmp case.0x46bcbf.100
mov dword [esi + 0x70], 1
mov eax, dword [esi + 0xcb24]
test eax, eax
je 0x46bd41
mov edx, dword [esi + 0xc900]
lea ecx, [esi + 0xc9dc]
push 0
push ecx
push edx
push 1
push esi
call eax
test eax, eax
jne 0x46be46
push esi
mov dword [esi + 0xc9ac], 0
call fcn.0046c140
add esp, 4
test eax, eax
je 0x46bd7c
mov edi, dword [esp + 0x10]
cmp eax, edi
jle 0x46bd66
mov edi, eax
mov dword [esp + 0x10], edi
cmp dword [esi + 0xc9ac], 1
jg 0x46be75
cmp edi, 0x50
je 0x46be75
mov eax, dword [esi + 0xcb24]
test eax, eax
je case.0x46bcbf.100
lea ecx, [esi + 0xc930]
lea edx, [esi + 0xc9dc]
push ecx
mov ecx, dword [esi + 0xc900]
push edx
push ecx
push 3
push esi
call eax
test eax, eax
jne 0x46bea1
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x50]
inc eax
cmp eax, ecx
mov dword [esp + 0x2c], eax
jb 0x46b841
mov edx, dword [esp + 0x40]
mov eax, dword [esi + 0xc904]
xor edi, edi
push edi
push edx
push eax
call fcn.0047960b
mov ecx, dword [esi + 0xc8e0]
mov edx, dword [esi + 0xc904]
push 0x2000
push ecx
push edx
mov dword [esi + 0xc90c], eax
call fcn.0047abb6
mov ecx, dword [esp + 0x60]
mov eax, dword [esp + 0x5c]
mov dword [esi + 0xc8e8], ecx
mov ecx, dword [esp + 0x50]
mov dword [esi + 0xc8e4], eax
mov eax, dword [esp + 0x30]
add esp, 0x18
inc ecx
cmp eax, edi
mov dword [esp + 0x38], ecx
je 0x46b5fc
jmp 0x46bed0
mov dword [esi + 0x70], 2
jmp case.0x46bcbf.100
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 0x3c
ret
pop edi
pop esi
pop ebp
mov eax, 0x33
pop ebx
add esp, 0x3c
ret
mov eax, dword [esp + 0x14]
test eax, eax
je 0x46be57
push eax
call fcn.0046fd2e
add esp, 4
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x46bec3
push eax
call fcn.0046fd2e
add esp, 4
mov eax, 0x50
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov eax, dword [esp + 0x14]
test eax, eax
je 0x46be86
push eax
call fcn.0046fd2e
add esp, 4
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x46be97
push eax
call fcn.0046fd2e
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov eax, dword [esp + 0x14]
test eax, eax
je 0x46beb2
push eax
call fcn.0046fd2e
add esp, 4
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x46bec3
push eax
call fcn.0046fd2e
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0x50
pop ebx
add esp, 0x3c
ret
mov eax, dword [esp + 0x14]
mov ebx, 0xb
cmp eax, edi
je 0x46bf2e
cmp dword [esi + 0x64], edi
jbe 0x46bf1f
mov ebp, dword [esp + 0x14]
cmp dword [ebp], 0
jne 0x46bf14
mov eax, dword [esi + 0x9c]
test eax, eax
jne 0x46bf00
mov eax, dword [esi + 0xa0]
test eax, eax
je 0x46bf09
push esi
call fcn.00466d30
add esp, 4
cmp dword [esp + 0x10], 1
jg 0x46bf14
mov dword [esp + 0x10], ebx
mov eax, dword [esi + 0x64]
inc edi
add ebp, 4
cmp edi, eax
jb 0x46bee6
mov edx, dword [esp + 0x14]
push edx
call fcn.0046fd2e
add esp, 4
xor edi, edi
mov eax, dword [esp + 0x1c]
cmp eax, edi
je 0x46bf3f
push eax
call fcn.0046fd2e
add esp, 4
mov eax, dword [esp + 0x3c]
cmp eax, edi
mov eax, dword [esp + 0x10]
je 0x46bf54
cmp eax, edi
jne 0x46bf54
mov eax, 1
mov ecx, dword [esp + 0x30]
cmp ecx, edi
jne 0x46bf78
cmp eax, 1
jg 0x46bf78
mov esi, dword [esp + 0x20]
xor eax, eax
cmp eax, esi
pop edi
sbb eax, eax
pop esi
and eax, 0x46
pop ebp
add eax, ebx
pop ebx
add esp, 0x3c
ret
mov edx, dword [esp + 0x34]
cmp ecx, edx
jne 0x46bf92
cmp eax, 1
jg 0x46bf92
pop edi
pop esi
pop ebp
mov eax, 0x52
pop ebx
add esp, 0x3c
ret
cmp dword [esp + 0x20], edi
jbe 0x46bfaa
cmp eax, 1
jg 0x46bfaa
pop edi
pop esi
pop ebp
mov eax, 0x51
pop ebx
add esp, 0x3c
ret
cmp edx, edi
jbe 0x46bfb7
cmp eax, edi
jne 0x46bfb7
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret