Function at 0x475490
Capabilities:
Read file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4ec418
push eax
mov dword fs:[0], esp
push ebx
push ebp
push esi
push edi
mov eax, dword [esp + 0x20]
xor ebx, ebx
push 0x50f74c
push eax
mov byte [0x511398], bl
mov byte [0x511268], bl
mov byte [0x511238], bl
mov byte [0x5111f0], bl
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
cmp ebp, ebx
jne 0x475504
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], 0xffffffff
call fcn.004e2712
or ax, 0xffff
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov esi, dword [sym.imp.MSVCRT.dll_fread]
push ebp
push 0xa
push 1
push 0x511398
call esi
push ebp
push 1
push 2
push 0x5111e8
call esi
add esp, 0x20
cmp word [0x5111e8], 0xc8
push ebp
je 0x475562
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], 0xffffffff
call fcn.004e2712
mov ax, 0xfffe
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
push 1
push 2
push 0x5113a4
call esi
push ebp
push 1
push 2
push 0x5113a8
call esi
push ebp
push 1
push 2
push 0x5113ac
call esi
push ebp
push 1
push 2
push 0x5113b0
call esi
add esp, 0x40
push ebp
push 1
push 4
push 0x5113b4
call esi
push ebp
push 1
push 4
push 0x5113b8
call esi
push ebp
push 1
push 4
push 0x5113bc
call esi
push ebp
push 1
push 4
push 0x5113c0
call esi
add esp, 0x40
push ebp
push 1
push 4
push 0x5113c4
call esi
push ebp
push 1
push 4
push 0x5113c8
call esi
push ebp
push 1
push 4
push 0x5113cc
call esi
push ebp
push 1
push 4
push 0x5113d0
call esi
add esp, 0x40
push ebp
push 1
push 4
push 0x5113d4
call esi
push ebp
push 1
push 4
push 0x5113d8
call esi
push ebp
push 1
push 4
push 0x5113dc
call esi
push ebp
push 1
push 4
push 0x5113e0
call esi
add esp, 0x40
push ebp
push 1
push 4
push 0x5113e4
call esi
mov eax, dword [0x5113b0]
add esp, 0x10
cmp eax, 0x1f
jge 0x475709
push ebp
push 1
push 2
push 0x511274
call esi
mov edx, dword [0x5113ac]
mov ecx, dword [0x5113a4]
add esp, 0x10
xor eax, eax
cmp edx, ebx
sete al
xor edi, edi
cmp ecx, ebx
jle 0x475691
lea ebx, [eax*4 + 0x511278]
push ebp
push 1
push 2
push ebx
call esi
mov eax, dword [0x5113a4]
add esp, 0x10
inc edi
add ebx, 4
cmp edi, eax
jl 0x475679
push ebp
push 1
push 2
push 0x511378
call esi
push ebp
push 1
push 2
push 0x51137c
call esi
push ebp
push 1
push 2
push 0x511380
call esi
push ebp
push 1
push 2
push 0x511384
call esi
add esp, 0x40
push ebp
push 1
push 2
push 0x511388
call esi
push ebp
push 1
push 2
push 0x51138c
call esi
push ebp
push 1
push 2
push 0x511390
call esi
mov edi, 0x511398
or ecx, 0xffffffff
xor eax, eax
add esp, 0x30
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x511268
jmp 0x4757b9
push ebp
cmp eax, 0x65
push 1
push 2
jge 0x47574b
push 0x5111fc
call esi
push ebp
push 0x32
push 1
push 0x511200
call esi
mov edi, 0x511398
or ecx, 0xffffffff
xor eax, eax
add esp, 0x20
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x5111f0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
jmp 0x4757c0
push 0x511244
call esi
push ebp
push 1
push 4
push 0x511248
call esi
push ebp
push 1
push 4
push 0x51124c
call esi
push ebp
push 1
push 4
push 0x511250
call esi
add esp, 0x40
push ebp
push 1
push 2
push 0x511254
call esi
push ebp
push 0xa
push 1
push 0x511258
call esi
push ebp
push 1
push 2
push 0x511264
call esi
mov edi, 0x511398
or ecx, 0xffffffff
xor eax, eax
add esp, 0x30
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x511238
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
push ebp
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], 0xffffffff
call fcn.004e2712
mov ecx, dword [esp + 0x10]
pop edi
pop esi
pop ebp
xor ax, ax
mov dword fs:[0], ecx
pop ebx
add esp, 0xc
ret