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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5bb8db
mov eax, dword fs:[0]
push eax
sub esp, 0x84
mov eax, dword [0x621d30]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
call fcn.0048a293
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x46f468
push 0x80004005
call fcn.00453e40
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x60], eax
mov dword [ebp - 4], 0
mov ecx, dword [0x62d3c0]
push ecx
lea edx, [ebp - 0x60]
push str._smain.twin
push edx
call fcn.00453640
mov edi, dword [ebp - 0x60]
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x46f52b
call fcn.0048a293
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x46f4d3
push 0x80004005
call fcn.00453e40
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x54], eax
push edi
lea ecx, [ebp - 0x54]
push 0x5f245c
push ecx
mov byte [ebp - 4], 1
call fcn.00453640
mov esi, dword [ebp - 0x54]
add esp, 0xc
push 0
push 0x5ed0a8
push esi
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
lea eax, [esi - 0x10]
mov byte [ebp - 4], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x46f52b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x54], eax
test eax, eax
je 0x46f585
mov esi, eax
shr esi, 1
xor ecx, ecx
lea eax, [esi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0048970d
mov edi, eax
lea eax, [esi + esi + 2]
push eax
push 0
push edi
call fcn.00594660
mov edx, dword [ebp - 0x54]
add esp, 0x10
push 0
lea ecx, [ebp - 0x68]
push ecx
push edx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x46f5fa
call fcn.0048a293
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x46f59f
push 0x80004005
call fcn.00453e40
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x54], eax
push edi
lea ecx, [ebp - 0x54]
push 0x5f247c
push ecx
mov byte [ebp - 4], 2
call fcn.00453640
mov edi, dword [ebp - 0x54]
add esp, 0xc
push 0
push 0x5ed0a8
push edi
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
lea eax, [edi - 0x10]
mov byte [ebp - 4], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x46f5f7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebp - 0x60]
push ecx
add edi, 2
mov ecx, esp
mov dword [ebp - 0x64], esp
push edi
call fcn.00454490
lea esi, [ebp - 0x90]
call fcn.004841e0
mov byte [ebp - 4], 3
call fcn.0048a293
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x46f632
push 0x80004005
call fcn.00453e40
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x58], eax
xor ecx, ecx
push 0x3e
push ecx
lea edx, [ebp - 0x4e]
mov byte [ebp - 4], 4
push edx
mov word [ebp - 0x50], cx
call fcn.00594660
add esp, 0xc
call fcn.0048a293
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x46f674
push 0x80004005
call fcn.00453e40
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebx, [eax + 0x10]
mov dword [ebp - 0x5c], ebx
lea ecx, [ebp - 0x90]
push ecx
lea esi, [ebp - 0x58]
mov byte [ebp - 4], 5
call fcn.00484310
test al, al
je 0x46f9ef
push 3
lea edx, [ebp - 0x70]
push edx
lea ecx, [ebp - 0x58]
call fcn.00456700
mov eax, dword [eax]
mov ecx, 0x5f24ac
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x46f6d9
test dx, dx
je 0x46f6d5
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x46f6d9
add eax, 4
add ecx, 4
test dx, dx
jne 0x46f6b3
xor eax, eax
jmp 0x46f6de
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
mov eax, dword [ebp - 0x70]
sete bl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46f702
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x46f83e
mov esi, dword [ebp - 0x58]
mov ecx, dword [esi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
call eax
cmp dword [esi - 4], 0
lea ecx, [esi - 4]
jl 0x46f733
cmp eax, dword [esi - 0x10]
jne 0x46f733
lea edi, [esi - 0x10]
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x46f76b
mov ecx, dword [esi - 0xc]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x46fa8b
mov eax, dword [esi - 0xc]
mov dword [edi + 4], eax
mov eax, dword [esi - 0xc]
lea ecx, [eax + eax + 2]
push ecx
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [edi + 0x10]
push eax
call fcn.00591b21
add esp, 0x10
add edi, 0x10
mov dword [ebp - 0x54], edi
lea ecx, [ebp - 0x78]
push ecx
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 6
call fcn.00484420
lea edx, [ebp - 0x7c]
push edx
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 7
call fcn.004845d0
mov byte [ebp - 4], 8
mov esi, dword [ebp - 0x7c]
push esi
lea eax, [ebp - 0x50]
push 0x20
push eax
call fcn.005933e2
push 0x5ef22c
lea ecx, [ebp - 0x58]
push ecx
lea edx, [ebp - 0x6c]
push edx
call fcn.0046c320
add esp, 0x18
mov byte [ebp - 4], 9
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [ebp - 0x5c]
call fcn.00467310
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x6c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46f7ef
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 0xfffffff0
mov byte [ebp - 4], 7
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46f80f
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x78]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46f832
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x54]
jmp 0x46f9b9
push 4
lea ecx, [ebp - 0x74]
push ecx
lea ecx, [ebp - 0x58]
call fcn.00456700
mov eax, dword [eax]
mov ecx, 0x5ee420
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x46f879
test dx, dx
je 0x46f875
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x46f879
add eax, 4
add ecx, 4
test dx, dx
jne 0x46f853
xor eax, eax
jmp 0x46f87e
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
mov eax, dword [ebp - 0x74]
sete bl
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x46f8a2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x46f98a
mov eax, dword [ebp - 0x58]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [ebp - 0x5c]
call fcn.00467310
mov ebx, dword [ebp - 0x5c]
push ecx
mov ecx, dword [ebx - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
lea esi, [ebx - 0x10]
mov dword [ebp - 0x64], esp
mov dword [ebp - 0x64], esp
call eax
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x46f8eb
cmp eax, dword [esi]
jne 0x46f8eb
mov edi, esi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x46f926
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x46fa8b
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax + 2]
push ecx
lea edx, [esi + 0x10]
push edx
lea eax, [eax + eax + 2]
push eax
lea ecx, [edi + 0x10]
push ecx
call fcn.00591b21
add esp, 0x10
mov edx, dword [ebp - 0x64]
add edi, 0x10
lea ecx, [ebp - 0x50]
mov dword [edx], edi
call fcn.0046faa0
cmp dword [esi + 4], 0
mov edi, dword [esi]
je 0x46f9d8
cmp dword [esi + 0xc], 0
lea eax, [esi + 0xc]
jge 0x46f963
cmp dword [ebx - 8], 0
jl 0x46fa90
xor eax, eax
mov dword [ebx - 0xc], 0
mov word [ebx], ax
jmp 0x46f9d8
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x46f979
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov edx, dword [edi]
mov eax, dword [edx + 0xc]
mov ecx, edi
call eax
lea ebx, [eax + 0x10]
mov dword [ebp - 0x5c], ebx
jmp 0x46f9d8
push 0x5ef22c
lea ecx, [ebp - 0x58]
push ecx
lea edx, [ebp - 0x68]
push edx
call fcn.0046c320
add esp, 0xc
mov byte [ebp - 4], 0xa
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [ebp - 0x5c]
call fcn.00467310
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x68]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46f9d5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [ebp - 0x5c]
lea ecx, [ebp - 0x90]
push ecx
lea esi, [ebp - 0x58]
call fcn.00484310
test al, al
jne 0x46f69e
add ebx, 0xfffffff0
mov byte [ebp - 4], 4
lea edx, [ebx + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x46fa0f
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x58]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46fa32
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x8c]
test eax, eax
je 0x46fa49
push eax
call fcn.00489718
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x60]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46fa6f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005909d4
mov esp, ebp
pop ebp
ret
call fcn.00453e60
push 0x80070057
call fcn.00453e40
int3