Function at 0x4a7450
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x6c
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x19]
mov dword [esp + 8], eax
mov dword [esp + 4], str._CHT
lea esi, [ebp - 0x2c]
mov dword [esp], esi
call fcn.00509af0
mov dword [esp + 0xc], 1
mov dword [esp + 8], esi
mov eax, dword [ebx + 4]
mov dword [esp + 4], eax
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0042d7e0
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x2c]
lea esi, [eax - 0xc]
cmp esi, 0x55a154
jne 0x4a7826
lea eax, [ebp - 0x1a]
mov dword [esp + 8], eax
mov dword [esp + 4], str.DTKN
lea esi, [ebp - 0x30]
mov dword [esp], esi
call fcn.00509af0
mov dword [esp + 0xc], 1
mov dword [esp + 8], esi
mov eax, dword [ebx + 4]
mov dword [esp + 4], eax
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0042d7e0
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x30]
lea esi, [eax - 0xc]
mov edx, 0x55a154
cmp edx, esi
jne 0x4a78bc
lea eax, [ebp - 0x1b]
mov dword [esp + 8], eax
mov dword [esp + 4], str.CH00
lea esi, [ebp - 0x34]
mov dword [esp], esi
call fcn.00509af0
mov dword [esp + 0xc], 1
mov dword [esp + 8], esi
mov eax, dword [ebx + 4]
mov dword [esp + 4], eax
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0042d7e0
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x34]
lea esi, [eax - 0xc]
mov ecx, 0x55a154
cmp ecx, esi
jne 0x4a788a
lea eax, [ebp - 0x1c]
mov dword [esp + 8], eax
mov dword [esp + 4], str.CDPH
lea esi, [ebp - 0x38]
mov dword [esp], esi
call fcn.00509af0
mov dword [esp + 0xc], 1
mov dword [esp + 8], esi
mov eax, dword [ebx + 4]
mov dword [esp + 4], eax
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0042d7e0
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x38]
lea esi, [eax - 0xc]
mov edx, 0x55a154
cmp edx, esi
jne 0x4a7858
lea eax, [ebp - 0x1d]
mov dword [esp + 8], eax
mov dword [esp + 4], str.ChPr
lea esi, [ebp - 0x3c]
mov dword [esp], esi
call fcn.00509af0
mov dword [esp + 0xc], 1
mov dword [esp + 8], esi
mov eax, dword [ebx + 4]
mov dword [esp + 4], eax
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0042d7e0
mov esi, eax
mov eax, dword [ebp - 0x3c]
lea edi, [eax - 0xc]
mov ecx, 0x55a154
cmp ecx, edi
jne 0x4a77f4
cmp dword [ebp - 0x4c], 0xffffffff
je 0x4a772c
cmp dword [ebp - 0x54], 0xffffffff
je 0x4a7738
mov edi, dword [ebx + 4]
mov dword [esp + 4], 0x56b09b
mov dword [esp], edi
call sub.msvcrt.dll_fopen
mov esi, eax
test eax, eax
je 0x4a779c
mov dword [esp], eax
call sub.msvcrt.dll_rewind
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], esi
call sub.msvcrt.dll_fseek
mov dword [esp], esi
call sub.msvcrt.dll_ftell
mov edi, eax
mov dword [esp], esi
call sub.msvcrt.dll_rewind
mov eax, dword [ebp - 0x54]
add eax, 0x4000
mov dword [ebp - 0x50], eax
cmp eax, edi
jae 0x4a7774
sub edi, dword [ebp - 0x54]
sub edi, 0x4000
mov dword [ebp - 0x4c], edi
mov dword [esp], edi
call fcn.00538984
mov edi, eax
mov dword [esp + 8], 0
mov edx, dword [ebp - 0x50]
mov dword [esp + 4], edx
mov dword [esp], esi
call sub.msvcrt.dll_fseek
mov dword [esp + 0xc], esi
mov ecx, dword [ebp - 0x4c]
mov dword [esp + 8], ecx
mov dword [esp + 4], 1
mov dword [esp], edi
call sub.msvcrt.dll_fread
lea eax, [ebp - 0x1e]
mov dword [esp + 8], eax
mov dword [esp + 4], str.CH00
lea eax, [ebp - 0x40]
mov dword [esp], eax
call fcn.00509af0
mov edx, dword [ebp - 0x4c]
mov dword [esp + 0xc], edx
lea ecx, [ebp - 0x40]
mov dword [esp + 8], ecx
mov dword [esp + 4], edi
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0042d71c
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x40]
lea edx, [eax - 0xc]
mov dword [ebp - 0x50], edx
mov ecx, 0x55a154
cmp ecx, edx
jne 0x4a7917
cmp dword [ebp - 0x4c], 0xffffffff
je 0x4a7768
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x54]
lea edx, [ecx + eax + 0x3f80]
mov eax, edx
sub eax, dword [ebp - 0x54]
mov dword [ebx + 0x50], eax
test edi, edi
je 0x4a7715
mov dword [esp], edi
mov dword [ebp - 0x5c], edx
call fcn.00538958
mov edx, dword [ebp - 0x5c]
mov dword [esp], esi
mov dword [ebp - 0x5c], edx
call sub.msvcrt.dll_fclose
mov al, 1
mov edx, dword [ebp - 0x5c]
cmp dword [ebp - 0x58], 0xffffffff
jne 0x4a7757
nop
xor eax, eax
add esp, 0x6c
pop ebx
pop esi
pop edi
leave
ret
mov edx, dword [ebp - 0x4c]
add edx, 0xffffff80
cmp dword [ebp - 0x50], 0xffffffff
je 0x4a7788
mov eax, edx
sub eax, dword [ebp - 0x50]
sub eax, 0xffffff80
mov dword [ebx + 0x50], eax
mov al, 1
cmp dword [ebp - 0x58], 0xffffffff
je 0x4a772c
mov ecx, dword [ebp - 0x58]
sub ecx, edx
mov dword [ebx + 0x54], ecx
add esp, 0x6c
pop ebx
pop esi
pop edi
leave
ret
test edi, edi
je 0x4a7774
mov dword [esp], edi
call fcn.00538958
mov dword [esp], esi
call sub.msvcrt.dll_fclose
xor eax, eax
add esp, 0x6c
pop ebx
pop esi
pop edi
leave
ret
cmp esi, 0xffffffff
je 0x4a7798
mov eax, edx
sub eax, esi
mov dword [ebx + 0x50], eax
mov al, 1
jmp 0x4a7751
xor eax, eax
jmp 0x4a7751
lea eax, [ebp - 0x1f]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Cannot_Open_File:
lea ebx, [ebp - 0x44]
mov dword [esp], ebx
call fcn.00509af0
mov dword [esp + 4], edi
mov dword [esp], ebx
call fcn.005088ec
mov dword [esp], 8
call fcn.00538b64
mov esi, eax
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.005167d8
mov dword [esp + 8], 0x516950
mov dword [esp + 4], 0x572394
mov dword [esp], esi
call fcn.00539374
cmp dword [0x554500], 0
jne 0x4a78ea
mov eax, dword [edi + 8]
lea edx, [eax - 1]
mov dword [edi + 8], edx
test eax, eax
jg 0x4a75db
lea eax, [ebp - 0x24]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.005084ec
jmp 0x4a75db
cmp dword [0x554500], 0
jne 0x4a796a
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov dword [esi + 8], edx
test eax, eax
jg 0x4a74a8
lea eax, [ebp - 0x20]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.005084ec
jmp 0x4a74a8
cmp dword [0x554500], 0
jne 0x4a7952
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov dword [esi + 8], edx
test eax, eax
jg 0x4a758f
lea eax, [ebp - 0x23]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.005084ec
jmp 0x4a758f
cmp dword [0x554500], 0
jne 0x4a7982
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov dword [esi + 8], edx
test eax, eax
jg 0x4a7542
lea eax, [ebp - 0x22]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.005084ec
jmp 0x4a7542
cmp dword [0x554500], 0
jne 0x4a7902
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov dword [esi + 8], edx
test eax, eax
jg 0x4a74f5
lea eax, [ebp - 0x21]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.005084ec
jmp 0x4a74f5
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a780a
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a78ce
cmp dword [0x554500], 0
jne 0x4a7a43
mov edx, dword [ebp - 0x50]
mov eax, dword [edx + 8]
lea edx, [eax - 1]
mov ecx, dword [ebp - 0x50]
mov dword [ecx + 8], edx
test eax, eax
jg 0x4a76e8
lea eax, [ebp - 0x25]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x50]
mov dword [esp], eax
call fcn.005084ec
jmp 0x4a76e8
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a786e
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a783c
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a78a0
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a7933