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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc8
push ebx
push esi
push edi
cmp dword [ebp + 0x10], 0
je 0x4bde2f
mov eax, dword [ebp + 0x10]
push eax
call fcn.0049c15c
pop ecx
mov esi, eax
test eax, eax
je 0x4bde2f
xor ebx, ebx
jmp 0x4bde34
mov ebx, 1
test bl, bl
jne 0x4be00a
push 0
push 0x80
push 3
push 0
push 3
push closesocket
mov eax, dword [ebp + 0xc]
push eax
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4be00a
mov dword [ebp - 0x10], 1
xor edx, edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x18], edx
push esi
call fcn.0049b898
pop ecx
mov dword [ebp - 8], eax
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 4]
push ecx
call sub.KERNEL32.DLL_GetFileSize
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
push eax
mov edx, dword [ebp - 0x24]
push edx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
push eax
call fcn.00413004
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
mov edx, dword [ebp + 0x14]
add esp, 0xc
mov eax, dword [edx]
mov edx, dword [edx + 4]
cmp edx, dword [ebp - 0x34]
jne 0x4bdeb9
cmp eax, dword [ebp - 0x38]
jae 0x4bdff7
lea eax, [ebp - 0x28]
lea edx, [ebp - 0x24]
push eax
push edx
mov ecx, dword [ebp + 0x14]
xor edi, edi
push dword [ecx + 4]
push dword [ecx]
mov edx, dword [ebp + 8]
mov ecx, dword [edx]
push ecx
call fcn.0041303c
add esp, 0x14
lea eax, [ebp - 0x24]
push 0
push eax
mov edx, dword [ebp - 0x28]
push edx
mov ecx, dword [ebp - 4]
push ecx
call sub.KERNEL32.DLL_SetFilePointer
mov eax, dword [ebp + 0x14]
mov edx, dword [eax]
mov dword [ebp - 0x30], edx
mov edx, dword [eax + 4]
mov dword [ebp - 0x2c], edx
jmp 0x4bdfd2
xor edi, edi
mov eax, dword [ebp + 0x10]
mov bl, byte [eax + edi]
mov eax, dword [ebp - 0x18]
add eax, edi
cdq
idiv esi
mov dword [ebp - 0x14], edx
cmp edi, dword [ebp - 0x1c]
jge 0x4bdf2b
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x14]
mov dl, byte [ecx + eax]
mov byte [ebp - 9], dl
jmp 0x4bdf59
lea ecx, [ebp - 0x20]
push 0
push ecx
lea edx, [ebp - 9]
mov eax, dword [ebp - 0x10]
push eax
push edx
mov ecx, dword [ebp - 4]
push ecx
call sub.KERNEL32.DLL_ReadFile
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x14]
mov cl, byte [ebp - 9]
mov byte [eax + edx], cl
inc dword [ebp - 0x1c]
add dword [ebp - 0x30], 1
adc dword [ebp - 0x2c], 0
inc edi
cmp byte [ebp + 0x18], 0
jne 0x4bdf6d
movsx eax, bl
cmp eax, 0x40
jle 0x4bdf6d
cmp eax, 0x5b
jl 0x4bdf71
xor edx, edx
jmp 0x4bdf76
mov edx, 1
shl edx, 5
or bl, dl
cmp byte [ebp + 0x18], 0
jne 0x4bdf8f
movsx eax, byte [ebp - 9]
cmp eax, 0x40
jle 0x4bdf8f
cmp eax, 0x5b
jl 0x4bdf93
xor edx, edx
jmp 0x4bdf98
mov edx, 1
shl edx, 5
or byte [ebp - 9], dl
cmp bl, byte [ebp - 9]
jne 0x4bdfab
cmp esi, edi
jge 0x4bdf07
cmp esi, edi
jge 0x4bdfc5
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp + 0x14]
sub eax, 1
mov edx, dword [ebp - 0x2c]
sbb edx, 0
mov dword [ecx], eax
mov dword [ecx + 4], edx
jmp 0x4bdfef
mov eax, dword [ebp - 0x18]
inc eax
cdq
idiv esi
mov dword [ebp - 0x18], edx
dec dword [ebp - 0x1c]
mov eax, esi
cdq
add eax, dword [ebp - 0x30]
adc edx, dword [ebp - 0x2c]
sub eax, 1
sbb edx, 0
cmp edx, dword [ebp - 0x34]
jne 0x4bdfe9
cmp eax, dword [ebp - 0x38]
jb 0x4bdf05
cmp esi, edi
setl bl
and ebx, 1
mov eax, dword [ebp - 4]
push eax
call sub.KERNEL32.DLL_CloseHandle
mov edx, dword [ebp - 8]
push edx
call fcn.0049b6d4
pop ecx
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret