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

Disassembly:
push 0x418
mov eax, 0x53e897
call fcn.004d5897
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x41c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x408], edi
mov dword [ebp - 0x414], eax
call fcn.0048617b
push eax
lea ecx, [ebp - 0xc0]
call fcn.00482aa9
xor ebx, ebx
mov dword [ebp - 4], ebx
call fcn.00486187
mov ecx, eax
call fcn.00483339
test al, al
je 0x4a8183
push edi
lea ecx, [ebp - 0xc0]
call fcn.00482db0
push ebx
push 0x80
push 3
push ebx
push 1
push accept
lea ecx, [ebp - 0xc0]
call fcn.00482ce7
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x404], eax
cmp eax, 0xffffffff
jne 0x4a812f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call fcn.00482bd0
jmp 0x4a830e
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x4a811b
push esi
mov dword [ebp - 0x418], ebx
call fcn.004d4f27
pop ecx
push ebx
mov edi, eax
lea eax, [ebp - 0x418]
push eax
push esi
push edi
push dword [ebp - 0x404]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x404]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x418], esi
je 0x4a82f7
push edi
call fcn.004d4f30
pop ecx
jmp 0x4a811b
call fcn.00486187
push eax
lea ecx, [ebp - 0xc0]
call fcn.00482d93
call fcn.00486193
push eax
lea ecx, [ebp - 0x1c8]
call fcn.00482aa9
mov byte [ebp - 4], 1
call fcn.00486535
test al, al
je 0x4a81c1
call fcn.0048618d
mov esi, eax
mov dword [ebp - 0x404], esi
jmp 0x4a8204
push ebx
lea ecx, [ebp - 0x1c8]
call fcn.00482ce7
push eax
call fcn.0048b827
pop ecx
pop ecx
mov edi, eax
lea ecx, [ebp - 0xc0]
push edi
call fcn.00482ce7
push eax
call fcn.0049cb90
mov esi, eax
mov dword [ebp - 0x404], esi
pop ecx
pop ecx
test edi, edi
je 0x4a81fe
push edi
call fcn.004d4f30
pop ecx
mov edi, dword [ebp - 0x408]
test esi, esi
jne 0x4a8218
lea ecx, [ebp - 0x1c8]
call fcn.00482bd0
jmp 0x4a811b
push 0xffffffffffffffff
push edi
lea ecx, [ebp - 0x144]
mov dword [ebp - 0x410], ebx
call fcn.00482ace
push 0x55b80c
push 0x54a4d4
lea ecx, [ebp - 0x144]
mov byte [ebp - 4], 2
call fcn.004834f5
lea eax, [ebp - 0x3f8]
push eax
lea eax, [ebp - 0x410]
push eax
push 1
lea ecx, [ebp - 0x144]
call fcn.00482ce7
push eax
push esi
call fcn.0049c55e
add esp, 0x14
test eax, eax
je 0x4a827b
lea ecx, [ebp - 0x144]
call fcn.00482bd0
jmp 0x4a8208
mov esi, dword [ebp - 0x1cc]
test esi, esi
je 0x4a826e
push esi
call fcn.004d4f27
push esi
mov edi, eax
push edi
push dword [ebp - 0x410]
push dword [ebp - 0x404]
call fcn.0049cfcf
add esp, 0x14
test eax, eax
je 0x4a82cc
cmp eax, 0x600
je 0x4a82cc
push edi
call fcn.004d4f30
pop ecx
call fcn.00486535
test al, al
jne 0x4a826e
push dword [ebp - 0x404]
call fcn.0049c341
pop ecx
jmp 0x4a826e
call fcn.00486535
test al, al
jne 0x4a82e1
push dword [ebp - 0x404]
call fcn.0049c341
pop ecx
lea ecx, [ebp - 0x144]
call fcn.00482bd0
lea ecx, [ebp - 0x1c8]
call fcn.00482bd0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call fcn.00482bd0
test edi, edi
jne 0x4a8390
push ebx
push 0x80
push 3
push ebx
push 1
push accept
push dword [ebp - 0x408]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x408], eax
cmp eax, 0xffffffff
je 0x4a8389
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x4a8389
push esi
mov dword [ebp - 0x404], ebx
call fcn.004d4f27
pop ecx
push ebx
mov edi, eax
lea eax, [ebp - 0x404]
push eax
push esi
push edi
push dword [ebp - 0x408]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x408]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x404], esi
je 0x4a8385
push edi
call fcn.004d4f30
pop ecx
mov edi, ebx
test edi, edi
jne 0x4a8390
xor eax, eax
jmp 0x4a864f
push esi
lea eax, [ebp - 0x40c]
push edi
push eax
call fcn.004ebc10
add esp, 0xc
mov ecx, dword [ebp - 0x40c]
mov dword [ebp - 4], 3
test ecx, ecx
je 0x4a864d
mov esi, dword [ebp - 0x41c]
mov edi, dword [sym.imp.KERNEL32.dll_MulDiv]
test esi, esi
jne 0x4a83e6
push 0x64
push dword [ebp + 0x14]
call fcn.004ec1c0
call fcn.004d51e0
push eax
call edi
mov ecx, dword [ebp - 0x40c]
mov esi, eax
mov dword [ebp - 0x41c], esi
mov eax, dword [ebp - 0x414]
test eax, eax
jne 0x4a840e
push 0x64
push dword [ebp + 0x14]
call fcn.004ebc00
call fcn.004d51e0
push eax
call edi
mov ecx, dword [ebp - 0x40c]
mov dword [ebp - 0x414], eax
push ebx
push eax
push esi
lea eax, [ebp - 0x424]
push eax
call fcn.004ebea0
cmp dword [ebp - 0x424], 0
mov byte [ebp - 4], 4
je 0x4a8624
xor eax, eax
lea ecx, [ebp - 0x424]
inc eax
push eax
push 3
push 2
push eax
push ebx
call fcn.004ebaf0
lea ecx, [ebp - 0x424]
call fcn.004ebbe0
push 0x2c
mov edi, eax
lea eax, [ebp - 0x3c]
push ebx
push eax
call fcn.0050d990
add esp, 0xc
mov ecx, dword [ebp - 0x414]
xor eax, eax
mov dword [ebp - 0x3c], 0x28
inc eax
mov dword [ebp - 0x38], esi
mov word [ebp - 0x30], ax
neg ecx
push 0x20
pop eax
mov word [ebp - 0x2e], ax
mov eax, dword [ebp - 0x414]
imul eax, esi
push ebx
push ebx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x410], eax
shl eax, 2
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x400]
push eax
push ebx
lea eax, [ebp - 0x3c]
mov byte [ebp - 0x3f9], bl
push eax
push ebx
mov dword [ebp - 0x400], ebx
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [ebp - 0x408], eax
test eax, eax
je 0x4a8624
mov edx, dword [ebp - 0x410]
mov esi, ebx
test edx, edx
jle 0x4a85c6
mov eax, dword [ebp - 0x400]
mov cl, byte [edi + esi*4 + 3]
mov byte [eax + esi*4 + 3], cl
mov eax, 0xff
mov ecx, dword [ebp - 0x400]
cmp byte [ecx + esi*4 + 3], al
jae 0x4a8565
movzx ecx, byte [edi + esi*4 + 3]
xor edx, edx
movzx eax, byte [edi + esi*4 + 2]
imul eax, ecx
mov ecx, 0xff
mov byte [ebp - 0x3f9], 1
div ecx
mov ecx, dword [ebp - 0x400]
xor edx, edx
mov byte [ecx + esi*4], al
movzx ecx, byte [edi + esi*4 + 3]
movzx eax, byte [edi + esi*4 + 1]
imul eax, ecx
mov ecx, 0xff
div ecx
mov ecx, dword [ebp - 0x400]
xor edx, edx
mov byte [ecx + esi*4 + 1], al
movzx ecx, byte [edi + esi*4 + 3]
movzx eax, byte [edi + esi*4]
imul eax, ecx
mov ecx, 0xff
div ecx
mov ecx, dword [ebp - 0x400]
mov edx, dword [ebp - 0x410]
mov byte [ecx + esi*4 + 2], al
jmp 0x4a8587
mov al, byte [edi + esi*4 + 2]
mov byte [ecx + esi*4], al
mov eax, dword [ebp - 0x400]
mov cl, byte [edi + esi*4 + 1]
mov byte [eax + esi*4 + 1], cl
mov eax, dword [ebp - 0x400]
mov cl, byte [edi + esi*4]
mov byte [eax + esi*4 + 2], cl
mov eax, dword [ebp - 0x400]
mov ecx, dword [ebp + 0x18]
cmp dword [eax + esi*4], ecx
jne 0x4a85bd
mov byte [eax + esi*4], bl
mov eax, dword [ebp - 0x400]
mov byte [ebp - 0x3f9], 1
mov byte [eax + esi*4 + 1], bl
mov eax, dword [ebp - 0x400]
mov byte [eax + esi*4 + 2], bl
mov eax, dword [ebp - 0x400]
mov byte [eax + esi*4 + 3], bl
inc esi
cmp esi, edx
jl 0x4a84d9
push 0xa4
call fcn.004d4602
mov esi, eax
pop ecx
mov dword [ebp - 0x410], esi
mov byte [ebp - 4], 5
test esi, esi
je 0x4a85eb
lea ecx, [esi + 0x18]
call fcn.00482af2
jmp 0x4a85ed
mov esi, ebx
mov eax, dword [ebp - 0x408]
mov dword [esi], eax
mov eax, dword [ebp - 0x41c]
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x414]
mov dword [esi + 0x10], eax
mov al, byte [ebp - 0x3f9]
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov ebx, esi
mov byte [esi + 0x14], al
mov eax, dword [ebp - 0x400]
mov dword [esi + 0xa0], eax
mov ecx, dword [ebp - 0x420]
test ecx, ecx
je 0x4a8633
call fcn.0040a7d0
cmp dword [ebp - 0x40c], 0
je 0x4a864d
push dword [ebp - 0x40c]
lea ecx, [ebp - 0x40c]
call fcn.004a1e8e
mov eax, ebx
call fcn.004d5841
ret