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

Disassembly:
sub esp, 0x128
push ebx
mov ecx, dword [esp + 0x130]
push ebp
mov ebp, dword [esp + 0x138]
push esi
xor ebx, ebx
mov eax, dword [ebp]
push edi
push ebx
push 0x80
push 3
push ebx
push ebx
push bind
push ecx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x3c], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x475393
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x128
ret
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
push edi
mov dword [esp + 0x18], edi
call fcn.0048ac32
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x4753bd
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret
lea edx, [esp + 0x30]
push 0
push edx
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x20]
mov eax, ecx
shl eax, 5
add eax, ecx
lea esi, [eax + eax*2]
mov eax, ecx
shl eax, 5
shl esi, 3
add eax, ecx
lea eax, [eax + eax*2]
lea edx, [eax + eax + 0x40]
mov eax, dword [ebp + 4]
mov dword [esp + 0x18], esi
cmp ecx, eax
mov dword [esp + 0x24], edx
jne 0x47544e
lea ecx, [eax + 0x64]
mov eax, ecx
shl eax, 5
add eax, ecx
mov ecx, dword [ebp + 0x28]
lea eax, [eax + eax*2]
shl eax, 3
push eax
push ecx
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 + 0x14]
add eax, 0x64
mov dword [ebp + 0x28], esi
mov esi, dword [esp + 0x18]
mov dword [ebp + 4], eax
xor edx, edx
xor ecx, ecx
cmp ebx, edi
mov dword [esp + 0x18], edx
jae 0x475473
mov eax, dword [esp + 0x1c]
mov al, byte [ebx + eax]
cmp al, 0x3b
je 0x4754a1
cmp al, 0xd
je 0x4754a1
mov byte [esp + ecx + 0x34], al
inc ebx
inc ecx
cmp ebx, edi
jb 0x47545a
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0048ace4
mov eax, dword [esp + 0x24]
mov ecx, dword [ebp + 8]
add esp, 4
mov edx, eax
sub edx, ecx
mov dword [ebp], eax
pop edi
mov dword [ebp + 0xc], edx
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x128
ret
cmp ebx, edi
jae 0x475473
cmp edx, 5
mov byte [esp + ecx + 0x34], 0
ja case.default.0x4754b3
jmp dword [edx*4 + 0x475690]
lea edi, [esp + 0x34]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 4
jae 0x4754e7
mov ecx, dword [esp + 0x1c]
mov al, byte [ebx + ecx]
cmp al, 0xd
mov eax, dword [esp + 0x14]
je 0x4754e3
inc ebx
cmp ebx, eax
jb 0x4754cd
jmp 0x475473
cmp ebx, eax
jae 0x475473
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
mov al, byte [ebx + eax]
cmp al, 0x3b
jne 0x475655
mov edx, dword [esp + 0x18]
inc ebx
inc edx
jmp 0x475450
lea edx, [esp + 0x34]
push edx
call fcn.0048c4a4
mov ecx, eax
mov eax, dword [ebp + 0x28]
add esp, 4
mov dword [esp + 0x28], ecx
mov edx, dword [esi + eax + 0x20c]
lea eax, [esi + eax + 0x20c]
or edx, 2
mov dword [esp + 0x10], 0
mov dword [eax], edx
mov edx, dword [ebp + 0x28]
mov byte [esi + edx + 0x208], cl
jmp case.0x4754b3.1
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x10]
cmp eax, ecx
jge 0x475582
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x34]
push eax
push ecx
call fcn.004596c0
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 0x28]
add edx, eax
mov eax, dword [esp + 0x34]
add esp, 8
mov dword [ecx + edx*4], eax
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
jmp case.0x4754b3.1
sub eax, ecx
cmp eax, 5
ja case.default.0x47558d
jmp dword [eax*4 + 0x4756a8]
mov eax, dword [ebp + 0x28]
lea edx, [esp + 0x34]
add eax, esi
mov cl, byte [edx]
inc edx
mov byte [eax], cl
inc eax
test cl, cl
jne 0x47559d
inc dword [esp + 0x10]
jmp case.0x4754b3.1
mov edx, dword [ebp + 0x28]
lea ecx, [esp + 0x34]
lea edx, [edx + esi + 0xf0]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x4755be
inc dword [esp + 0x10]
jmp case.0x4754b3.1
mov eax, dword [ebp + 0x28]
lea ecx, [esp + 0x34]
lea edx, [eax + esi + 0x80]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x4755df
inc dword [esp + 0x10]
jmp case.0x4754b3.1
mov edx, dword [ebp + 0x28]
lea ecx, [esp + 0x34]
lea edx, [edx + esi + 0xc0]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x475600
inc dword [esp + 0x10]
jmp case.0x4754b3.1
mov eax, dword [ebp + 0x28]
lea ecx, [esp + 0x34]
lea edx, [eax + esi + 0xd0]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x475621
inc dword [esp + 0x10]
jmp case.0x4754b3.1
mov edx, dword [ebp + 0x28]
lea ecx, [esp + 0x34]
lea edx, [edx + esi + 0xe0]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x475642
inc dword [esp + 0x10]
jmp case.0x4754b3.1
cmp al, 0xd
je 0x475663
mov edx, dword [esp + 0x18]
inc edx
jmp 0x475450
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
add ebx, 2
inc ecx
add edx, 0xc6
add esi, 0x318
xor eax, eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x10], eax
jmp 0x4753f3