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

Disassembly:
push 0x418
mov eax, 0x53eb37
call fcn.004d5b87
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.004863cf
push eax
lea ecx, [ebp - 0xc0]
call fcn.00482cfa
xor ebx, ebx
mov dword [ebp - 4], ebx
call fcn.004863db
mov ecx, eax
call fcn.0048358a
test al, al
je 0x4a83d3
push edi
lea ecx, [ebp - 0xc0]
call fcn.00483001
push ebx
push 0x80
push 3
push ebx
push 1
push accept
lea ecx, [ebp - 0xc0]
call fcn.00482f38
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x404], eax
cmp eax, 0xffffffff
jne 0x4a837f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call fcn.00482e21
jmp 0x4a855e
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x4a836b
push esi
mov dword [ebp - 0x418], ebx
call fcn.004d521a
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 0x4a8547
push edi
call fcn.004d5223
pop ecx
jmp 0x4a836b
call fcn.004863db
push eax
lea ecx, [ebp - 0xc0]
call fcn.00482fe4
call fcn.004863e7
push eax
lea ecx, [ebp - 0x1c8]
call fcn.00482cfa
mov byte [ebp - 4], 1
call fcn.00486789
test al, al
je 0x4a8411
call fcn.004863e1
mov esi, eax
mov dword [ebp - 0x404], esi
jmp 0x4a8454
push ebx
lea ecx, [ebp - 0x1c8]
call fcn.00482f38
push eax
call fcn.0048ba7b
pop ecx
pop ecx
mov edi, eax
lea ecx, [ebp - 0xc0]
push edi
call fcn.00482f38
push eax
call fcn.0049cde0
mov esi, eax
mov dword [ebp - 0x404], esi
pop ecx
pop ecx
test edi, edi
je 0x4a844e
push edi
call fcn.004d5223
pop ecx
mov edi, dword [ebp - 0x408]
test esi, esi
jne 0x4a8468
lea ecx, [ebp - 0x1c8]
call fcn.00482e21
jmp 0x4a836b
push 0xffffffffffffffff
push edi
lea ecx, [ebp - 0x144]
mov dword [ebp - 0x410], ebx
call fcn.00482d1f
push 0x55bbec
push 0x54a8bc
lea ecx, [ebp - 0x144]
mov byte [ebp - 4], 2
call fcn.00483746
lea eax, [ebp - 0x3f8]
push eax
lea eax, [ebp - 0x410]
push eax
push 1
lea ecx, [ebp - 0x144]
call fcn.00482f38
push eax
push esi
call fcn.0049c7ae
add esp, 0x14
test eax, eax
je 0x4a84cb
lea ecx, [ebp - 0x144]
call fcn.00482e21
jmp 0x4a8458
mov esi, dword [ebp - 0x1cc]
test esi, esi
je 0x4a84be
push esi
call fcn.004d521a
push esi
mov edi, eax
push edi
push dword [ebp - 0x410]
push dword [ebp - 0x404]
call fcn.0049d21f
add esp, 0x14
test eax, eax
je 0x4a851c
cmp eax, 0x600
je 0x4a851c
push edi
call fcn.004d5223
pop ecx
call fcn.00486789
test al, al
jne 0x4a84be
push dword [ebp - 0x404]
call fcn.0049c591
pop ecx
jmp 0x4a84be
call fcn.00486789
test al, al
jne 0x4a8531
push dword [ebp - 0x404]
call fcn.0049c591
pop ecx
lea ecx, [ebp - 0x144]
call fcn.00482e21
lea ecx, [ebp - 0x1c8]
call fcn.00482e21
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call fcn.00482e21
test edi, edi
jne 0x4a85e0
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 0x4a85d9
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x4a85d9
push esi
mov dword [ebp - 0x404], ebx
call fcn.004d521a
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 0x4a85d5
push edi
call fcn.004d5223
pop ecx
mov edi, ebx
test edi, edi
jne 0x4a85e0
xor eax, eax
jmp 0x4a889f
push esi
lea eax, [ebp - 0x40c]
push edi
push eax
call fcn.004ebe50
add esp, 0xc
mov ecx, dword [ebp - 0x40c]
mov dword [ebp - 4], 3
test ecx, ecx
je 0x4a889d
mov esi, dword [ebp - 0x41c]
mov edi, dword [sym.imp.KERNEL32.dll_MulDiv]
test esi, esi
jne 0x4a8636
push 0x64
push dword [ebp + 0x14]
call fcn.004ec400
call fcn.004d54d0
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 0x4a865e
push 0x64
push dword [ebp + 0x14]
call fcn.004ebe40
call fcn.004d54d0
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.004ec0e0
cmp dword [ebp - 0x424], 0
mov byte [ebp - 4], 4
je 0x4a8874
xor eax, eax
lea ecx, [ebp - 0x424]
inc eax
push eax
push 3
push 2
push eax
push ebx
call fcn.004ebd30
lea ecx, [ebp - 0x424]
call fcn.004ebe20
push 0x2c
mov edi, eax
lea eax, [ebp - 0x3c]
push ebx
push eax
call fcn.0050eb70
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 0x4a8874
mov edx, dword [ebp - 0x410]
mov esi, ebx
test edx, edx
jle 0x4a8816
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 0x4a87b5
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 0x4a87d7
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 0x4a880d
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 0x4a8729
push 0xa4
call fcn.004d48fc
mov esi, eax
pop ecx
mov dword [ebp - 0x410], esi
mov byte [ebp - 4], 5
test esi, esi
je 0x4a883b
lea ecx, [esi + 0x18]
call fcn.00482d43
jmp 0x4a883d
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 0x4a8883
call fcn.0040ac30
cmp dword [ebp - 0x40c], 0
je 0x4a889d
push dword [ebp - 0x40c]
lea ecx, [ebp - 0x40c]
call fcn.004a20de
mov eax, ebx
call fcn.004d5b31
ret