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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x677d36
mov eax, dword fs:[0]
push eax
sub esp, 0x328
push esi
push edi
push ecx
lea edi, [ebp - 0x334]
mov ecx, 0xca
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
pop ecx
mov eax, dword [0x730b1c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
call fcn.0047d850
push eax
lea ecx, [ebp - 0xa4]
call fcn.0048b610
mov dword [ebp - 4], 0
call fcn.0047d860
mov ecx, eax
call fcn.0048b820
movzx eax, al
test eax, eax
je 0x504e79
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0xa4]
call fcn.0048c1f0
mov esi, esp
push 0
push 0x80
push 3
push 0
push 1
push accept
lea ecx, [ebp - 0xa4]
call fcn.0048ba90
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp esi, esp
call fcn.00611b50
mov dword [ebp - 0xac], eax
cmp dword [ebp - 0xac], 0xffffffff
jne 0x504d83
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa4]
call fcn.0048b700
jmp 0x505028
mov esi, esp
push 0
mov edx, dword [ebp - 0xac]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp esi, esp
call fcn.00611b50
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x504dd1
mov esi, esp
mov eax, dword [ebp - 0xac]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, esp
call fcn.00611b50
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa4]
call fcn.0048b700
jmp 0x505028
mov dword [ebp - 0xb4], 0
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.00610910
add esp, 4
mov dword [ebp - 0x31c], eax
mov edx, dword [ebp - 0x31c]
mov dword [ebp - 0x18], edx
mov esi, esp
push 0
lea eax, [ebp - 0xb4]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0xac]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp esi, esp
call fcn.00611b50
mov esi, esp
mov ecx, dword [ebp - 0xac]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, esp
call fcn.00611b50
mov edx, dword [ebp - 0xb4]
cmp edx, dword [ebp - 0x1c]
je 0x504e74
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x320], eax
mov ecx, dword [ebp - 0x320]
push ecx
call fcn.00610850
add esp, 4
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa4]
call fcn.0048b700
jmp 0x505028
jmp 0x50500e
call fcn.0047d860
push eax
lea ecx, [ebp - 0xa4]
call fcn.0048c1b0
mov dword [ebp - 0xbc], 0
call fcn.0047d870
movzx edx, al
test edx, edx
je 0x504ead
call fcn.0047d880
mov dword [ebp - 0xbc], eax
jmp 0x504ecb
push 2
push 0
lea ecx, [ebp - 0xa4]
call fcn.0048ba90
push eax
call fcn.004b2980
add esp, 0xc
mov dword [ebp - 0xbc], eax
cmp dword [ebp - 0xbc], 0
jne 0x504eeb
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa4]
call fcn.0048b700
jmp 0x505028
lea eax, [ebp - 0x2f0]
push eax
lea ecx, [ebp - 0x2fc]
push ecx
push 1
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0xbc]
push eax
call fcn.004b2d10
add esp, 0x14
test eax, eax
je 0x504f29
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa4]
call fcn.0048b700
jmp 0x505028
mov ecx, dword [ebp - 0xc4]
mov dword [ebp - 0x1c], ecx
cmp dword [ebp - 0x1c], 0
jne 0x504f4f
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa4]
call fcn.0048b700
jmp 0x505028
mov edx, dword [ebp - 0x1c]
push edx
call fcn.00610910
add esp, 4
mov dword [ebp - 0x324], eax
mov eax, dword [ebp - 0x324]
mov dword [ebp - 0x18], eax
push 3
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x2fc]
push eax
mov ecx, dword [ebp - 0xbc]
push ecx
call fcn.004b2e80
add esp, 0x14
mov dword [ebp - 0x304], eax
cmp dword [ebp - 0x304], 0
je 0x504ff3
cmp dword [ebp - 0x304], 0x600
je 0x504ff3
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x328], edx
mov eax, dword [ebp - 0x328]
push eax
call fcn.00610850
add esp, 4
mov dword [ebp - 0x18], 0
call fcn.0047d870
movzx ecx, al
test ecx, ecx
jne 0x504fdf
mov edx, dword [ebp - 0xbc]
push edx
call fcn.004b2f10
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa4]
call fcn.0048b700
jmp 0x505028
call fcn.0047d870
movzx eax, al
test eax, eax
jne 0x50500e
mov ecx, dword [ebp - 0xbc]
push ecx
call fcn.004b2f10
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa4]
call fcn.0048b700
xor edx, edx
jne 0x504cf2
cmp dword [ebp - 0x18], 0
jne 0x50513a
mov esi, esp
push 0
push 0x80
push 3
push 0
push 1
push accept
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp esi, esp
call fcn.00611b50
mov dword [ebp - 0x308], eax
cmp dword [ebp - 0x308], 0xffffffff
jne 0x50506b
jmp 0x50513a
mov esi, esp
push 0
mov ecx, dword [ebp - 0x308]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp esi, esp
call fcn.00611b50
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x5050a7
mov esi, esp
mov edx, dword [ebp - 0x308]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, esp
call fcn.00611b50
jmp 0x50513a
mov dword [ebp - 0x310], 0
mov eax, dword [ebp - 0x1c]
push eax
call fcn.00610910
add esp, 4
mov dword [ebp - 0x32c], eax
mov ecx, dword [ebp - 0x32c]
mov dword [ebp - 0x18], ecx
mov esi, esp
push 0
lea edx, [ebp - 0x310]
push edx
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x308]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp esi, esp
call fcn.00611b50
mov esi, esp
mov eax, dword [ebp - 0x308]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, esp
call fcn.00611b50
mov ecx, dword [ebp - 0x310]
cmp ecx, dword [ebp - 0x1c]
je 0x505133
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x330], edx
mov eax, dword [ebp - 0x330]
push eax
call fcn.00610850
add esp, 4
mov dword [ebp - 0x18], 0
jmp 0x50513a
cmp dword [ebp - 0x18], 0
jne 0x505144
xor eax, eax
jmp 0x505178
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov ecx, dword [ebp - 0x14]
call fcn.00505220
mov dword [ebp - 0x318], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x334], eax
mov ecx, dword [ebp - 0x334]
push ecx
call fcn.00610850
add esp, 4
mov eax, dword [ebp - 0x318]
push edx
mov ecx, ebp
push eax
lea edx, [0x5051b4]
call fcn.00611af0
pop eax
pop edx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00610840
add esp, 0x334
cmp ebp, esp
call fcn.00611b50
mov esp, ebp
pop ebp
ret 4