Function at 0x46e980
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov ebx, dword [ebp + 8]
mov dword [esp + 0xc], 0x52ec9f
mov dword [esp + 8], 0x52e9fc
mov dword [esp + 4], 0x400
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0043102c
mov dword [esp + 0xc], 0x52ec9f
mov dword [esp + 8], 0x52e9fc
mov dword [esp + 4], 0x400
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0043102c
mov dword [esp + 8], 0x52ea91
mov dword [esp + 4], 0x10
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0043102c
mov edx, dword [ebx + 0x18]
test edx, edx
je 0x46ec61
mov eax, dword [ebx + 0x2c]
or eax, dword [ebx + 0x28]
je 0x46ec20
mov eax, dword [ebx]
mov edx, dword [eax + 8]
test edx, edx
je 0x46ec8b
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x52eaa6
mov dword [esp + 4], 0x10
mov dword [esp], eax
call fcn.0043102c
mov eax, dword [ebx + 0x28]
mov edx, dword [ebx + 0x2c]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edx
mov dword [esp + 8], 0x52eabc
mov dword [esp + 4], 0x10
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0043102c
mov esi, dword [ebx + 0x28]
mov ecx, dword [ebx + 0x2c]
mov edx, dword [ebx]
mov eax, dword [edx + 8]
shl eax, 9
cmp ecx, 0
jbe 0x46ebe4
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x52eaf8
mov dword [esp + 4], 0x10
mov dword [esp], edx
call fcn.0043102c
mov eax, dword [ebx]
mov eax, dword [eax + 8]
shl eax, 9
mov dword [esp], eax
call fcn.0050963c
mov dword [ebx + 0x30], eax
test eax, eax
je 0x46ec37
mov dword [esp + 8], 0x52eb2b
mov dword [esp + 4], 0x10
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0043102c
mov eax, dword [ebx + 0x18]
mov dword [esp + 0xc], eax
mov eax, dword [ebx]
mov eax, dword [eax + 8]
shl eax, 9
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov esi, eax
mov edx, dword [ebx]
mov eax, dword [edx + 8]
shl eax, 9
cmp esi, eax
je 0x46eb10
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x52eb44
mov dword [esp + 4], 0x10
mov dword [esp], edx
call fcn.0043102c
mov edx, dword [ebx]
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x52eb6a
mov dword [esp + 4], 0x10
mov dword [esp], edx
call fcn.0043102c
mov edi, esi
sar edi, 0x1f
mov eax, dword [ebx + 0x28]
mov edx, dword [ebx + 0x2c]
sub eax, esi
sbb edx, edi
mov dword [ebx + 0x28], eax
mov dword [ebx + 0x2c], edx
fld dword [ebx + 0x3c]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edx
fild qword [ebp - 0x30]
test edx, edx
js 0x46ec2c
fstp dword [ebp - 0x1c]
fld dword [ebp - 0x1c]
fsubr st(1)
fdivrp st(1)
fmul dword [0x52ed00]
fnstcw word [ebp - 0x1e]
mov ax, word [ebp - 0x1e]
mov ah, 0xc
mov word [ebp - 0x20], ax
fldcw word [ebp - 0x20]
fistp dword [ebp - 0x24]
fldcw word [ebp - 0x1e]
mov eax, dword [ebp - 0x24]
mov dword [ebx + 0x40], eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x52eb80
mov dword [esp + 4], 0x1000
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0043102c
mov eax, dword [ebx + 0x28]
mov edx, dword [ebx + 0x2c]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edx
mov dword [esp + 8], str.OS:_Bytes_left_to_send:__llu
mov dword [esp + 4], 0x10
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0043102c
mov eax, dword [ebx]
mov eax, dword [eax + 8]
shl eax, 9
mov dword [ebx + 0x44], eax
mov eax, dword [ebx + 0x30]
mov dword [ebx + 0x48], eax
lea eax, [ebx + 0x44]
add esp, 0x4c
pop ebx
pop esi
pop edi
leave
ret
cmp esi, eax
jae 0x46ea69
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ecx
mov dword [esp + 8], 0x52ead4
mov dword [esp + 4], 0x10
mov dword [esp], edx
call fcn.0043102c
mov edx, dword [ebx]
mov eax, dword [edx + 8]
shl eax, 9
jmp 0x46ea69
mov eax, dword [ebx]
mov edx, dword [eax + 8]
jmp 0x46ea0e
fadd dword [0x52ecfc]
jmp 0x46eb55
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 8
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 0xc
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
cmp edx, 3
je 0x46ecf9
cmp edx, 2
je 0x46ed5c
mov dword [esp], eax
call fcn.005099c0
mov dword [esp + 0xc], 0x52ec9f
mov dword [esp + 8], 0x52ea75
mov dword [esp + 4], 8
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0043102c
call fcn.00509b8c
xor eax, eax
jmp 0x46ebdb
mov dword [esp], eax
call fcn.005099c0
mov esi, dword [eax]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0x52ec9f
mov dword [esp + 8], 0x52ea3c
mov dword [esp + 4], 8
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0043102c
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.0046e6f0
call fcn.00509b8c
xor eax, eax
test esi, esi
jne 0x46ebdb
jmp 0x46ebd8
mov dword [esp], eax
call fcn.005099c0
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x52ec9f
mov dword [esp + 8], 0x52ea5e
mov dword [esp + 4], 8
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0043102c
jmp 0x46eced