Function at 0x46ccf8
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov ebx, dword [ebp + 8]
mov dword [esp + 0xc], 0x52e9de
mov dword [esp + 8], 0x52e818
mov dword [esp + 4], 0x400
mov eax, dword [ebx + 0xa8]
mov dword [esp], eax
call fcn.0043102c
mov eax, dword [ebx + 4]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0xa8]
mov dword [esp], eax
call fcn.004338b8
mov dword [ebp - 0x20], eax
xor esi, esi
mov dword [esp + 8], 0x52e864
mov dword [esp + 4], 8
mov eax, dword [ebx + 0xa8]
mov dword [esp], eax
call fcn.0043102c
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.0050963c
mov dword [ebx + 0x1c], eax
mov dword [esp + 4], 0x52e82f
mov eax, dword [ebx + 4]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov esi, eax
test eax, eax
je 0x46db15
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
call sub.msvcrt.dll_fseek
mov dword [esp], ebx
call fcn.0046c924
mov dword [esp], ebx
call fcn.0046cbd0
test al, al
je 0x46dbe7
mov eax, dword [ebx + 0xa0]
inc eax
mov edi, dword [ebx + 8]
cmp eax, edi
jae 0x46ce15
mov edx, 4
xor ecx, ecx
add edx, 1
adc ecx, 0
inc eax
cmp eax, edi
jb 0x46cdf0
mov eax, edx
xor eax, 0x20
or eax, ecx
je 0x46d440
mov eax, edx
xor eax, 0x24
or eax, ecx
je 0x46d118
mov eax, 0x1c
mov dword [ebx + 0x60], eax
mov dword [esp], eax
call fcn.0050963c
mov dword [ebx + 0x20], eax
test eax, eax
je 0x46dbbd
mov dword [esp + 8], 0x52e888
mov dword [esp + 4], 8
mov eax, dword [ebx + 0xa8]
mov dword [esp], eax
call fcn.0043102c
inc dword [ebx + 0xa0]
mov eax, dword [ebx + 0x68]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.0046c9d0
mov dword [ebx + 0x68], eax
cmp eax, 0x200
je 0x46d44c
mov dword [esp], 0x20000
call fcn.0050963c
mov dword [ebx + 0x54], eax
test eax, eax
je 0x46db93
mov eax, dword [ebx + 0x68]
mov dword [ebp - 0x24], eax
mov eax, dword [ebx + 0xa0]
add eax, 4
mov dword [ebp - 0x1c], eax
mov dword [ebx + 0xa0], eax
mov eax, dword [ebx + 0x90]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.0046c9d0
mov edi, eax
mov dword [ebx + 0x90], eax
cmp eax, 0x40000
je 0x46d6d4
cmp eax, 0x48000
je 0x46d8c4
mov eax, dword [ebp - 0x1c]
add eax, 4
mov dword [ebx + 0xa0], eax
mov eax, dword [ebx + 0x74]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.0046c9d0
mov edx, eax
mov dword [ebx + 0x74], eax
mov eax, dword [ebp - 0x1c]
add eax, 8
mov dword [ebx + 0xa0], eax
mov eax, dword [ebx + 0x78]
mov dword [esp + 4], eax
mov dword [esp], ebx
mov dword [ebp - 0x28], edx
call fcn.0046c9d0
mov ecx, eax
mov dword [ebx + 0x78], eax
mov eax, dword [ebp - 0x1c]
add eax, 0xc
mov dword [ebx + 0xa0], eax
mov eax, dword [ebx + 0x7c]
mov dword [esp + 4], eax
mov dword [esp], ebx
mov dword [ebp - 0x2c], ecx
call fcn.0046c9d0
mov dword [ebx + 0x7c], eax
add edi, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
lea edx, [edi + edx]
mov ecx, dword [ebp - 0x2c]
lea ecx, [edx + ecx]
add ecx, eax
mov edi, dword [ebx + 0x60]
cmp edi, 0x20
je 0x46d710
cmp edi, 0x24
je 0x46d868
mov dword [ebx + 0x80], 0
mov dword [ebx + 0x84], 0
xor eax, eax
xor edi, edi
mov dword [esp + 4], eax
mov dword [esp], 0x52e8c7
call sub.msvcrt.dll_printf
mov eax, dword [ebx + 0x74]
test eax, eax
jne 0x46d2bc
mov eax, dword [ebx + 0x78]
test eax, eax
jne 0x46d27c
mov eax, dword [ebx + 0x7c]
test eax, eax
jne 0x46d23c
test edi, edi
jne 0x46d188
mov ecx, dword [ebx + 0x84]
test ecx, ecx
jne 0x46d124
mov edx, dword [ebx + 0x80]
test edx, edx
jne 0x46d124
mov eax, dword [ebx + 0x84]
test eax, eax
jne 0x46d5ec
mov dword [ebp - 0x1c], 0
mov dword [esp + 8], 0x52e8d0
mov dword [esp + 4], 8
mov eax, dword [ebx + 0xa8]
mov dword [esp], eax
call fcn.0043102c
mov dword [esp], esi
call sub.msvcrt.dll_rewind
cmp dword [ebx + 0x68], 0x200
je 0x46d3ec
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x20000
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x54]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, 0x20000
jne 0x46db69
mov eax, dword [ebx + 0x90]
cmp eax, 0x40000
je 0x46d654
cmp eax, 0x48000
je 0x46d7c0
mov dword [esp + 8], 0x52e8f4
mov dword [esp + 4], 8
mov eax, dword [ebx + 0xa8]
mov dword [esp], eax
call fcn.0043102c
mov eax, dword [ebx + 0x74]
test eax, eax
jne 0x46d39c
mov eax, dword [ebx + 0x7c]
test eax, eax
jne 0x46d34c
mov eax, dword [ebx + 0x78]
test eax, eax
jne 0x46d2fc
test edi, edi
jne 0x46d1cc
mov edi, dword [ebx + 0x80]
test edi, edi
jne 0x46d558
mov ecx, dword [ebx + 0x84]
test ecx, ecx
jne 0x46d934
mov dword [esp + 8], 0x52e930
mov dword [esp + 4], 8
mov eax, dword [ebx + 0xa8]
mov dword [esp], eax
call fcn.0043102c
mov dword [esp + 0xc], esi
mov eax, dword [ebx + 0x60]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, dword [ebx + 0x60]
jne 0x46dc11
mov dword [esp], esi
call sub.msvcrt.dll_fclose
mov eax, dword [ebp - 0x1c]
test eax, eax
sete al
add esp, 0x4c
pop ebx
pop esi
pop edi
leave
ret
mov eax, 0x24
jmp 0x46ce1a
mov eax, dword [ebx + 0x88]
mov dword [esp], eax
call fcn.0050963c
mov dword [ebx + 0x24], eax
test eax, eax
je 0x46db3f
mov eax, dword [ebx + 0x80]
test eax, eax
je 0x46cfc7
mov dword [esp], eax
call fcn.0050963c
mov dword [ebx + 0x2c], eax
test eax, eax
jne 0x46cfc7
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov eax, dword [ebx + 0x80]
test eax, eax
jne 0x46d514
mov dword [ebp - 0x1c], 0
mov eax, dword [ebx + 0x84]
test eax, eax
je 0x46cfdc
mov dword [esp], eax
call fcn.0050963c
mov dword [ebx + 0x28], eax
test eax, eax
jne 0x46cfdc
mov dword [ebp - 0x1c], 5
jmp 0x46cfdc
mov edx, dword [ebx + 0x80]
test edx, edx
jne 0x46d490
mov eax, dword [ebx + 0x84]
test eax, eax
je 0x46d0b8
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, dword [ebx + 0x84]
je 0x46d0b8
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
lea esi, [esi]
mov dword [esp], eax
call fcn.0050963c
mov dword [ebx + 0x38], eax
test eax, eax
jne 0x46cfa3
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
lea esi, [esi]
mov dword [esp], eax
call fcn.0050963c
mov dword [ebx + 0x34], eax
test eax, eax
jne 0x46cf98
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
lea esi, [esi]
mov dword [esp], eax
call fcn.0050963c
mov dword [ebx + 0x3c], eax
test eax, eax
jne 0x46cf8d
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
lea esi, [esi]
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x34]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, dword [ebx + 0x78]
je 0x46d094
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
nop
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x38]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, dword [ebx + 0x7c]
je 0x46d089
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
nop
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x3c]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, dword [ebx + 0x74]
je 0x46d07e
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
nop
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x800
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x54]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, 0x800
je 0x46d039
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov eax, 0x20
jmp 0x46ce1a
mov dword [esp], 0x800
call fcn.0050963c
mov dword [ebx + 0x54], eax
test eax, eax
jne 0x46ce88
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
lea esi, [esi]
mov dword [esp + 0xc], esi
mov eax, dword [ebx + 0x88]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x24]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, dword [ebx + 0x88]
jne 0x46dac1
mov dword [esp + 0xc], esi
mov eax, dword [ebx + 0x80]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x2c]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, dword [ebx + 0x80]
je 0x46d1da
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov eax, dword [ebx + 0x88]
mov dword [esp], eax
call fcn.0050963c
mov dword [ebx + 0x24], eax
cmp eax, 1
sbb eax, eax
and eax, 5
mov dword [ebp - 0x1c], eax
mov eax, dword [ebx + 0x80]
mov dword [esp], eax
call fcn.0050963c
mov dword [ebx + 0x2c], eax
test eax, eax
jne 0x46d19d
mov dword [ebp - 0x1c], 5
jmp 0x46d19d
mov dword [esp + 0xc], esi
mov eax, dword [ebx + 0x88]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x24]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, dword [ebx + 0x88]
jne 0x46daeb
mov eax, dword [ebx + 0x84]
test eax, eax
jne 0x46d9b8
mov dword [esp + 0xc], esi
mov eax, dword [ebx + 0x80]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x2c]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, dword [ebx + 0x80]
je 0x46d0b8
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
nop
mov dword [esp], eax
call fcn.0050963c
mov dword [ebx + 0x28], eax
test eax, eax
je 0x46dd2d
cmp dword [ebx + 0x84], 0x31fff
ja 0x46cfd5
mov eax, dword [ebx + 0x8c]
mov dword [esp], eax
call fcn.0050963c
mov dword [ebx + 0x30], eax
test eax, eax
jne 0x46cfd5
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
nop
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x20000
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x4c]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, 0x20000
jne 0x46deca
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x20000
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x50]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, 0x20000
je 0x46d055
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
nop
mov dword [esp], 0x20000
call fcn.0050963c
mov dword [ebx + 0x4c], eax
test eax, eax
je 0x46dea0
mov dword [esp], 0x20000
call fcn.0050963c
mov dword [ebx + 0x50], eax
test eax, eax
je 0x46de76
mov eax, dword [ebx + 0xa0]
mov dword [ebp - 0x1c], eax
jmp 0x46ced0
mov eax, dword [ebp - 0x1c]
add eax, 0x10
mov dword [ebx + 0xa0], eax
mov eax, dword [ebx + 0x80]
mov dword [esp + 4], eax
mov dword [esp], ebx
mov dword [ebp - 0x2c], ecx
call fcn.0046c9d0
mov edx, eax
mov dword [ebx + 0x80], eax
mov eax, dword [ebx + 0x84]
mov ecx, dword [ebp - 0x2c]
cmp eax, 0x32000
jbe 0x46d762
cmp dword [ebp - 0x20], 0x200000
jbe 0x46d762
cmp dword [ebx + 0x90], 0x48000
je 0x46da90
mov edx, dword [ebx + 0x80]
test edx, edx
je 0x46de53
test eax, eax
jne 0x46d790
mov eax, dword [ebp - 0x20]
sub eax, edi
mov edi, eax
sub edi, edx
sub edi, ecx
mov dword [ebx + 0x88], edi
mov eax, edx
xor edi, edi
jmp 0x46cf72
mov edi, 0x32000
sub edi, eax
mov dword [ebx + 0x8c], edi
mov eax, edx
neg eax
sub eax, dword [ebx + 0x84]
sub eax, dword [ebx + 0x60]
add eax, dword [ebp - 0x20]
sub eax, edi
sub eax, ecx
mov dword [ebx + 0x88], eax
mov eax, edx
xor edi, edi
jmp 0x46cf72
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x18000
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x40]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, 0x18000
jne 0x46de29
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x18000
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x44]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, 0x18000
jne 0x46ddff
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x18000
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x48]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, 0x18000
je 0x46d055
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov eax, dword [ebp - 0x1c]
add eax, 0x10
mov dword [ebx + 0xa0], eax
mov eax, dword [ebx + 0x80]
mov dword [esp + 4], eax
mov dword [esp], ebx
mov dword [ebp - 0x2c], ecx
call fcn.0046c9d0
mov edx, eax
mov dword [ebx + 0x80], eax
mov eax, dword [ebp - 0x1c]
add eax, 0x14
mov dword [ebx + 0xa0], eax
mov eax, dword [ebx + 0x84]
mov dword [esp + 4], eax
mov dword [esp], ebx
mov dword [ebp - 0x28], edx
call fcn.0046c9d0
mov dword [ebx + 0x84], eax
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
jmp 0x46d742
mov dword [esp], 0x18000
call fcn.0050963c
mov dword [ebx + 0x40], eax
test eax, eax
je 0x46ddd5
mov dword [esp], 0x18000
call fcn.0050963c
mov dword [ebx + 0x44], eax
test eax, eax
je 0x46ddab
mov dword [esp], 0x18000
call fcn.0050963c
mov dword [ebx + 0x48], eax
test eax, eax
jne 0x46d702
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
nop
mov dword [esp + 0xc], esi
mov eax, dword [ebx + 0x88]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x24]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, dword [ebx + 0x88]
jne 0x46dd81
mov dword [esp + 0xc], esi
mov eax, dword [ebx + 0x84]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, dword [ebx + 0x84]
je 0x46d0b8
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, dword [ebx + 0x84]
jne 0x46dd57
mov eax, dword [ebx + 0x8c]
test eax, eax
je 0x46da38
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, dword [ebx + 0x8c]
je 0x46da38
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
nop
mov dword [esp + 0xc], esi
mov eax, dword [ebx + 0x80]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x2c]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, dword [ebx + 0x80]
je 0x46d0b8
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
nop
test edx, edx
je 0x46dab5
neg edi
sub edi, edx
sub edi, eax
add edi, dword [ebp - 0x20]
sub edi, ecx
mov dword [ebx + 0x88], edi
mov eax, dword [ebx + 0x80]
mov edi, 1
jmp 0x46cf72
xor eax, eax
mov edi, 1
jmp 0x46cf72
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 8
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 0x52e94c
mov dword [esp + 8], 0
mov dword [esp + 4], 0x536b20
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
cmp edx, 3
je 0x46dcde
cmp edx, 2
je 0x46dca2
mov dword [esp], eax
call fcn.005099c0
mov dword [esp + 0xc], 0x52e9de
mov dword [esp + 8], 0x52e9ad
mov dword [esp + 4], 8
mov eax, dword [ebx + 0xa8]
mov dword [esp], eax
call fcn.0043102c
test esi, esi
je 0x46dc83
mov dword [esp], esi
call sub.msvcrt.dll_fclose
call fcn.00509b8c
mov al, 1
jmp 0x46d10d
mov dword [esp], eax
call fcn.005099c0
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x52e9de
mov dword [esp + 8], 0x52e996
mov dword [esp + 4], 8
mov eax, dword [ebx + 0xa8]
mov dword [esp], eax
call fcn.0043102c
jmp 0x46dc83
mov dword [esp], eax
call fcn.005099c0
mov edi, dword [eax]
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 0x52e9de
mov dword [esp + 8], 0x52e974
mov dword [esp + 4], 8
mov eax, dword [ebx + 0xa8]
mov dword [esp], eax
call fcn.0043102c
mov dword [esp + 4], edi
mov dword [esp], ebx
call fcn.0046ca28
jmp 0x46dc77
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
xor edi, edi
test eax, eax
je 0x46cf72
mov edi, dword [ebp - 0x20]
sub edi, dword [ebx + 0x60]
sub edi, eax
sub edi, ecx
mov dword [ebx + 0x88], edi
xor eax, eax
xor edi, edi
jmp 0x46cf72
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c