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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
mov edi, dword fs:[0x18]
sub esp, 0x42c
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileSize]
mov esi, eax
sub esp, 8
mov eax, 0xd31
call fcn.00427180
cmp esi, 0xffffffff
je 0x43e358
mov eax, dword [0x8f0770]
mov dword [esp + 8], esi
mov dword [esp + 4], str.expected_INVALID_FILE_SIZE__got__lx_n
test eax, eax
je 0x43e340
mov dword [esp], 0
call fcn.00427ef0
lea eax, [ebp - 0x40c]
lea esi, [ebp - 0x410]
mov dword [ebp - 0x410], 0xdeadbeef
mov edx, dword fs:[0x18]
mov dword [edx + 0x34], 0xdeadbeef
mov dword [ebp - 0x414], edx
mov dword [esp + 4], eax
mov eax, dword [sym.imp.kernel32.dll_ReadFile]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0xffffff80
mov dword [esp], ebx
mov dword [ebp - 0x418], eax
call eax
sub esp, 0x14
mov edi, eax
mov eax, 0xd3b
call fcn.00427180
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], 0x591ddc
mov dword [esp], eax
call fcn.00427ef0
mov eax, 0xd3c
call fcn.00427180
mov edx, dword [ebp - 0x414]
mov eax, 1
mov ecx, dword [edx + 0x34]
cmp ecx, 8
je 0x43df3e
xor eax, eax
cmp ecx, 0x3e6
sete al
mov dword [esp + 8], ecx
mov dword [esp], eax
mov dword [esp + 4], str.expected_ERROR_NOT_ENOUGH_MEMORY__got__ld_n
call fcn.00427ef0
call fcn.0057d110
mov dword [eax], 0x58f03f
mov dword [eax + 4], 0xd3f
mov eax, dword [ebp - 0x410]
mov dword [esp + 4], 0x591ddc
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
mov edi, dword fs:[0x18]
call fcn.00427ef0
lea eax, [ebp - 0x40c]
mov dword [ebp - 0x410], 0xdeadbeef
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp + 4], eax
mov eax, dword [sym.imp.kernel32.dll_ReadConsoleA]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0xffffff80
mov dword [esp], ebx
mov dword [ebp - 0x414], eax
call eax
sub esp, 0x14
mov dword [ebp - 0x41c], eax
call fcn.0057d110
mov edx, dword [ebp - 0x41c]
mov dword [eax], 0x58f03f
mov dword [eax + 4], 0xd44
xor eax, eax
test edx, edx
sete al
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 4], 0x591ddc
call fcn.00427ef0
call fcn.0057d110
mov dword [eax], 0x58f03f
mov dword [eax + 4], 0xd45
mov edx, dword [edi + 0x34]
mov eax, 1
cmp edx, 8
je 0x43e032
xor eax, eax
cmp edx, 0x3e6
sete al
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 4], str.expected_ERROR_NOT_ENOUGH_MEMORY__got__ld_n
call fcn.00427ef0
call fcn.0057d110
mov dword [eax], 0x58f03f
mov dword [eax + 4], 0xd48
mov eax, dword [ebp - 0x410]
mov dword [esp + 4], str.expected_0xdeadbeef__got__lx_n
cmp eax, 0xdeadbeef
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00427ef0
lea eax, [ebp - 0x40c]
mov dword [ebp - 0x410], 0xdeadbeef
mov edi, dword [sym.imp.kernel32.dll_ReadConsoleW]
mov edx, dword fs:[0x18]
mov dword [edx + 0x34], 0xdeadbeef
mov dword [ebp - 0x41c], edx
mov dword [esp], ebx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0xffffff80
mov dword [esp + 4], eax
call edi
sub esp, 0x14
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x58f03f
mov dword [eax + 4], 0xd4d
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], 0x591ddc
call fcn.00427ef0
call fcn.0057d110
mov edx, dword [ebp - 0x41c]
mov dword [eax], 0x58f03f
mov dword [eax + 4], 0xd4e
mov ecx, dword [edx + 0x34]
mov eax, 1
cmp ecx, 8
je 0x43e126
xor eax, eax
cmp ecx, 0x3e6
sete al
mov dword [esp + 8], ecx
mov dword [esp], eax
mov dword [esp + 4], str.expected_ERROR_NOT_ENOUGH_MEMORY__got__ld_n
call fcn.00427ef0
call fcn.0057d110
mov dword [eax], 0x58f03f
mov dword [eax + 4], 0xd51
mov eax, dword [ebp - 0x410]
mov dword [esp + 4], str.expected_0xdeadbeef__got__lx_n
cmp eax, 0xdeadbeef
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00427ef0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], 0x58f33b
call dword [sym.imp.kernel32.dll_CreateFileA]
sub esp, 0x1c
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x58f03f
mov dword [eax + 4], 0xd54
xor eax, eax
cmp ebx, 0xffffffff
setne al
mov dword [esp + 4], str.Could_not_open_console_n
mov dword [esp], eax
call fcn.00427ef0
lea eax, [ebp - 0x40c]
mov dword [esp], ebx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x200
mov dword [esp + 4], eax
call edi
sub esp, 0x14
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x58f03f
mov dword [eax + 4], 0xd57
xor eax, eax
mov edx, dword fs:[0x18]
mov ecx, dword [edx + 0x34]
test edi, edi
jne 0x43e22f
xor eax, eax
cmp ecx, 6
sete al
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [esp + 4], str.ReadConsoleW_returned__lx__lu__n
call fcn.00427ef0
lea eax, [ebp - 0x40c]
mov dword [esp], ebx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x400
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x414]
call eax
sub esp, 0x14
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x58f03f
mov dword [eax + 4], 0xd5b
xor eax, eax
mov edx, dword fs:[0x18]
mov ecx, dword [edx + 0x34]
test edi, edi
jne 0x43e29f
xor eax, eax
cmp ecx, 6
sete al
mov dword [esp + 0xc], ecx
mov dword [esp], eax
mov dword [esp + 8], edi
mov dword [esp + 4], str.ReadConsoleA_returned__lx__lu__n
call fcn.00427ef0
lea eax, [ebp - 0x40c]
mov dword [esp], ebx
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x400
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x418]
call eax
sub esp, 0x14
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x58f03f
mov dword [eax + 4], 0xd5f
xor eax, eax
mov edx, dword fs:[0x18]
mov ecx, dword [edx + 0x34]
test esi, esi
jne 0x43e30f
xor eax, eax
cmp ecx, 6
sete al
mov dword [esp + 8], esi
mov dword [esp + 0xc], ecx
mov dword [esp + 4], str.ReadFile_returned__lx__lu__n
mov dword [esp], eax
call fcn.00427ef0
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 1
call fcn.00427ef0
jmp 0x43de9a
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], str.expected_INVALID_FILE_SIZE__got__lx_n
mov dword [esp], 1
call fcn.00427ef0
mov eax, 0xd34
call fcn.00427180
cmp dword [edi + 0x34], 6
mov eax, 1
je 0x43e392
xor eax, eax
cmp dword [edi + 0x34], 1
sete al
mov edx, dword [edi + 0x34]
mov dword [esp + 4], 0x591db4
mov dword [esp], eax
mov dword [esp + 8], edx
call fcn.00427ef0
jmp 0x43de9a