Function at 0x474770
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x12c
push ebx
push esi
mov eax, dword [esp + 0x138]
push edi
xor edi, edi
push edi
push 0x80
push 3
push edi
push edi
push bind
push eax
mov dword [esp + 0x28], edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x474aee
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push ebx
mov dword [esp + 0x28], ebx
call fcn.0048ac32
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x4747d7
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
add esp, 0x12c
ret
push ebp
lea ecx, [esp + 0x34]
push 0
push ecx
push ebx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebp, dword [esp + 0x144]
mov ecx, dword [ebp]
mov eax, ecx
mov dword [esp + 0x24], ecx
shl eax, 5
add eax, ecx
lea ebx, [eax + eax*2]
shl ebx, 3
mov dword [esp + 0x14], ecx
mov eax, dword [ebp + 4]
mov ecx, dword [esp + 0x14]
cmp ecx, eax
mov dword [esp + 0x1c], 0
jne 0x474869
lea ecx, [eax + 0x64]
mov eax, ecx
shl eax, 5
add eax, ecx
lea edx, [eax + eax*2]
mov eax, dword [ebp + 0x28]
shl edx, 3
push edx
push eax
call fcn.0048c170
mov edi, dword [ebp + 4]
mov esi, eax
mov edx, edi
mov ecx, 0x4d58
shl edx, 5
add edx, edi
xor eax, eax
add esp, 8
lea edx, [edx + edx*2]
lea edi, [esi + edx*8]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 4]
mov edi, dword [esp + 0x10]
add eax, 0x64
mov dword [ebp + 0x28], esi
mov dword [ebp + 4], eax
mov dword [esp + 0x18], 0
mov edx, dword [esp + 0x28]
xor ecx, ecx
cmp edi, edx
jae 0x474ad6
mov esi, dword [esp + 0x20]
mov al, byte [edi + esi]
cmp al, 0x3b
je 0x4748a1
cmp al, 0xd
je 0x4748a1
mov byte [esp + ecx + 0x38], al
inc edi
inc ecx
cmp edi, edx
mov dword [esp + 0x10], edi
jb 0x47487f
jmp 0x474ada
cmp edi, edx
jae 0x474ada
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x4748ba
cmp ecx, 8
jl 0x474a94
mov byte [esp + ecx + 0x38], 0
mov ecx, dword [esp + 0x1c]
test ecx, ecx
jne case.default.0x4748d4
cmp eax, 0xb
ja case.default.0x4748d4
jmp dword [eax*4 + 0x474af8]
lea eax, [esp + 0x30]
lea ecx, [esp + 0x38]
push eax
push ecx
call fcn.004596c0
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x38]
add esp, 8
xor ecx, ecx
test eax, eax
jle 0x474913
mov eax, dword [ebp + 0x28]
add eax, 0xf8
cmp edx, dword [eax]
je 0x474922
inc ecx
add eax, 0x318
cmp ecx, dword [esp + 0x24]
jl 0x474903
mov eax, dword [ebp + 0x28]
mov dword [eax + ebx + 0xf8], edx
jmp case.default.0x4748d4
mov dword [esp + 0x1c], 1
jmp case.default.0x4748d4
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x38]
push ecx
push edx
call fcn.004596c0
mov eax, dword [ebp + 0x28]
mov ecx, dword [esp + 0x34]
add esp, 8
mov dword [eax + ebx + 0xfc], ecx
jmp case.default.0x4748d4
mov eax, dword [ebp + 0x28]
lea edx, [esp + 0x38]
add eax, ebx
mov cl, byte [edx]
inc edx
mov byte [eax], cl
inc eax
test cl, cl
jne 0x47495d
jmp case.default.0x4748d4
lea edx, [esp + 0x38]
push edx
call fcn.0048c4a4
mov ecx, dword [ebp + 0x28]
add esp, 4
mov byte [ecx + ebx + 0x208], al
jmp case.default.0x4748d4
lea edx, [esp + 0x38]
push edx
call fcn.0048c4a4
mov ecx, dword [ebp + 0x28]
add esp, 4
mov byte [ecx + ebx + 0x209], al
jmp case.default.0x4748d4
lea edx, [esp + 0x38]
push edx
call fcn.0048c4a4
mov ecx, dword [ebp + 0x28]
add esp, 4
mov dword [ecx + ebx + 0x200], eax
jmp case.default.0x4748d4
lea edx, [esp + 0x38]
push edx
call fcn.0048c4a4
mov ecx, dword [ebp + 0x28]
add esp, 4
mov dword [ecx + ebx + 0x204], eax
jmp case.default.0x4748d4
mov edx, dword [ebp + 0x28]
lea ecx, [esp + 0x38]
lea edx, [edx + ebx + 0xf0]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x4749ea
jmp case.default.0x4748d4
mov eax, dword [ebp + 0x28]
lea ecx, [esp + 0x38]
lea edx, [eax + ebx + 0x80]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x474a04
jmp case.default.0x4748d4
lea ecx, [esp + 0x38]
push ecx
call fcn.00474340
mov edx, dword [ebp + 0x28]
add esp, 4
lea ecx, [esp + 0x38]
lea edx, [edx + ebx + 0xc0]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x474a2b
jmp case.default.0x4748d4
mov eax, dword [ebp + 0x28]
lea ecx, [esp + 0x38]
lea edx, [eax + ebx + 0xd0]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x474a45
jmp case.default.0x4748d4
mov edx, dword [ebp + 0x28]
lea ecx, [esp + 0x38]
lea edx, [edx + ebx + 0xe0]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x474a5f
mov al, byte [edi + esi]
cmp al, 0x3b
jne 0x474a83
mov eax, dword [esp + 0x18]
inc edi
inc eax
mov dword [esp + 0x10], edi
mov dword [esp + 0x18], eax
jmp 0x474871
cmp al, 0xd
je 0x474ab3
inc dword [esp + 0x18]
jmp 0x474871
mov edx, dword [esp + 0x28]
cmp edi, edx
jae 0x47480e
mov eax, dword [esp + 0x20]
inc edi
mov dword [esp + 0x10], edi
mov cl, byte [edi + eax - 1]
cmp cl, 0xa
jne 0x474a90
jmp 0x47480e
mov eax, dword [esp + 0x1c]
add edi, 2
test eax, eax
mov dword [esp + 0x10], edi
jne 0x47480e
mov ecx, dword [esp + 0x14]
inc ecx
add ebx, 0x318
jmp 0x47480a
mov esi, dword [esp + 0x20]
push esi
call fcn.0048ace4
mov eax, dword [esp + 0x18]
add esp, 4
mov dword [ebp], eax
mov dword [ebp + 8], eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x12c
ret