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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff004
push eax
add esp, 0xffffff58
mov eax, 0x47ddbc
call fcn.0046a008
mov dword [ebp - 0x10], 1
lea edx, [ebp + 0xc]
lea eax, [ebp + 0xc]
call fcn.00473ee4
inc dword [ebp - 0x10]
mov word [ebp - 0x1c], 8
mov edx, dword [ebp + 0x10]
xor ecx, ecx
mov dword [edx], ecx
mov word [ebp - 0x1c], 0x14
mov edx, 0x47dc62
lea eax, [ebp - 4]
call fcn.00473eac
inc dword [ebp - 0x10]
mov word [ebp - 0x1c], 8
push 0
push 0x80
push 3
push 0
push 1
push closesocket
lea eax, [ebp + 0xc]
call fcn.00401fd8
push eax
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0xffffffff
jne 0x40d989
mov word [ebp - 0x1c], 0x20
lea edx, [ebp - 4]
mov eax, dword [ebp + 8]
call fcn.00473fac
mov eax, dword [ebp + 8]
mov word [ebp - 0x1c], 0x2c
push eax
dec dword [ebp - 0x10]
lea eax, [ebp - 4]
mov edx, 2
call fcn.00473f7c
dec dword [ebp - 0x10]
lea eax, [ebp + 0xc]
mov edx, 2
call fcn.00473f7c
pop eax
mov word [ebp - 0x1c], 0x20
inc dword [ebp - 0x10]
mov edx, dword [ebp - 0x2c]
mov dword fs:[0], edx
jmp 0x40db98
push 0
push dword [ebp - 0x30]
call sub.KERNEL32.DLL_GetFileSize
mov dword [ebp - 0x34], eax
mov word [ebp - 0x1c], 8
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x34]
mov dword [ecx], eax
cmp dword [ebp - 0x34], 0
ja 0x40da06
push dword [ebp - 0x30]
call sub.KERNEL32.DLL_CloseHandle
mov word [ebp - 0x1c], 0x38
lea edx, [ebp - 4]
mov eax, dword [ebp + 8]
call fcn.00473fac
mov eax, dword [ebp + 8]
mov word [ebp - 0x1c], 0x44
push eax
dec dword [ebp - 0x10]
lea eax, [ebp - 4]
mov edx, 2
call fcn.00473f7c
dec dword [ebp - 0x10]
lea eax, [ebp + 0xc]
mov edx, 2
call fcn.00473f7c
pop eax
mov word [ebp - 0x1c], 0x38
inc dword [ebp - 0x10]
mov edx, dword [ebp - 0x2c]
mov dword fs:[0], edx
jmp 0x40db98
lea ecx, [ebp - 0x1098]
push ecx
call fcn.0040d5f8
pop ecx
push 0x10
push 0
lea eax, [ebp - 0x10a8]
push eax
call fcn.00469cbc
add esp, 0xc
push 0
lea edx, [ebp - 0x38]
push edx
push 0x1000
lea ecx, [ebp - 0x1040]
push ecx
push dword [ebp - 0x30]
call sub.KERNEL32.DLL_ReadFile
test eax, eax
jne 0x40da98
mov word [ebp - 0x1c], 0x50
lea edx, [ebp - 4]
mov eax, dword [ebp + 8]
call fcn.00473fac
mov eax, dword [ebp + 8]
mov word [ebp - 0x1c], 0x5c
push eax
dec dword [ebp - 0x10]
lea eax, [ebp - 4]
mov edx, 2
call fcn.00473f7c
dec dword [ebp - 0x10]
lea eax, [ebp + 0xc]
mov edx, 2
call fcn.00473f7c
pop eax
mov word [ebp - 0x1c], 0x50
inc dword [ebp - 0x10]
mov edx, dword [ebp - 0x2c]
mov dword fs:[0], edx
jmp 0x40db98
cmp dword [ebp - 0x38], 0
je 0x40dac4
push dword [ebp - 0x38]
lea ecx, [ebp - 0x1040]
push ecx
lea eax, [ebp - 0x1098]
push eax
call fcn.0040d634
add esp, 0xc
cmp dword [ebp - 0x38], 0x1000
je 0x40da26
lea edx, [ebp - 0x1098]
push edx
lea ecx, [ebp - 0x10a8]
push ecx
call fcn.0040d70c
add esp, 8
push dword [ebp - 0x30]
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
mov dword [ebp - 0x40], eax
mov word [ebp - 0x1c], 8
cmp dword [ebp - 0x40], 0x10
jge 0x40db49
mov edx, dword [ebp - 0x40]
xor ecx, ecx
mov cl, byte [ebp + edx - 0x10a8]
push ecx
push str._02x
lea eax, [ebp - 0x3b]
push eax
call fcn.0046b804
add esp, 0xc
mov word [ebp - 0x1c], 0x68
lea edx, [ebp - 0x3b]
lea eax, [ebp - 8]
call fcn.00473eac
inc dword [ebp - 0x10]
lea edx, [ebp - 8]
lea eax, [ebp - 4]
call fcn.00473fc0
dec dword [ebp - 0x10]
lea eax, [ebp - 8]
mov edx, 2
call fcn.00473f7c
inc dword [ebp - 0x40]
cmp dword [ebp - 0x40], 0x10
jl 0x40daf3
mov word [ebp - 0x1c], 0x74
lea edx, [ebp - 4]
mov eax, dword [ebp + 8]
call fcn.00473fac
mov eax, dword [ebp + 8]
mov word [ebp - 0x1c], 0x80
push eax
dec dword [ebp - 0x10]
lea eax, [ebp - 4]
mov edx, 2
call fcn.00473f7c
dec dword [ebp - 0x10]
lea eax, [ebp + 0xc]
mov edx, 2
call fcn.00473f7c
pop eax
mov word [ebp - 0x1c], 0x74
inc dword [ebp - 0x10]
mov edx, dword [ebp - 0x2c]
mov dword fs:[0], edx
mov esp, ebp
pop ebp
ret 0xc