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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x46ba1e
push eax
mov dword fs:[0], esp
sub esp, 0x84
push ebx
push ebp
push esi
mov esi, ecx
push edi
cmp byte [esi + 8], 0xdb
je 0x422974
xor ebp, ebp
push ebp
call fcn.00422810
add esp, 4
jmp 0x422976
xor ebp, ebp
mov eax, dword [esi + 0xc]
cmp eax, ebp
je 0x422990
mov cl, byte [esi + 9]
test cl, cl
jne 0x42298d
push eax
call fcn.0045cfdf
add esp, 4
mov dword [esi + 0xc], ebp
lea ecx, [esp + 0x34]
mov dword [esi + 0x10], ebp
mov dword [esi + 0x14], ebp
mov byte [esi + 9], 0
call fcn.00419d20
mov eax, dword [esp + 0xa4]
lea ecx, [esp + 0x34]
push eax
mov dword [esp + 0xa0], ebp
call fcn.0041a050
mov edi, dword [esp + 0xa8]
lea ecx, [esp + 0x34]
push edi
push ecx
call fcn.0041ba20
mov ebx, eax
add esp, 8
cmp ebx, 0xffffffff
je 0x422a9d
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x422a30
test edi, edi
je 0x422a92
lea ecx, [esp + 0x18]
call fcn.00416ed0
lea ecx, [esp + 0x18]
mov byte [esp + 0x9c], 1
call fcn.00418200
mov esi, dword [edi]
lea ecx, [esp + 0x18]
call fcn.00422700
push eax
mov ecx, edi
call dword [esi + 0x10]
lea ecx, [esp + 0x18]
mov byte [esp + 0x9c], 0
call fcn.004171c0
jmp 0x422a92
test ebp, ebp
jne 0x422a59
push ebp
push ebx
call fcn.0043cf40
add esp, 8
lea ecx, [esp + 0x34]
mov dword [esp + 0x9c], 0xffffffff
call fcn.00419de0
mov al, 1
jmp 0x422b7f
lea eax, [ebp + 4]
push eax
call fcn.0045d8e0
mov edi, eax
add esp, 4
test edi, edi
mov dword [esi + 0xc], edi
jne 0x422ab8
mov esi, dword [esp + 0xa8]
test esi, esi
je 0x422a92
mov edx, dword [esi]
push str.Out_of_memory_when_loading_Unicode_file_into_data_buffer.
mov ecx, esi
call dword [edx + 0x10]
mov eax, dword [esi]
push ebp
push str.fileSize
mov ecx, esi
call dword [eax + 0x2c]
push 0
push ebx
call fcn.0043cf40
add esp, 8
lea ecx, [esp + 0x34]
mov dword [esp + 0x9c], 0xffffffff
call fcn.00419de0
xor al, al
jmp 0x422b7f
lea ecx, [ebp + 4]
xor eax, eax
mov edx, ecx
push 0
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esi + 0xc]
lea eax, [esp + 0x18]
push eax
push ebp
push ecx
push ebx
mov dword [esi + 0x10], ebp
mov dword [esi + 0x14], ebp
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, dword [esp + 0xa8]
mov byte [esp + 0x13], 1
test eax, eax
jne 0x422b41
test esi, esi
je 0x422b3c
lea ecx, [esp + 0x18]
call fcn.00416ed0
lea ecx, [esp + 0x18]
mov byte [esp + 0x9c], 2
call fcn.00418200
mov edi, dword [esi]
lea ecx, [esp + 0x18]
call fcn.00422700
push eax
mov ecx, esi
call dword [edi + 0x10]
lea ecx, [esp + 0x18]
mov byte [esp + 0x9c], 0
call fcn.004171c0
mov byte [esp + 0x13], 0
cmp dword [esp + 0x14], ebp
je 0x422b5c
test esi, esi
je 0x422b57
mov edx, dword [esi]
push str.Failed_to_read_the_entire_file
mov ecx, esi
call dword [edx + 0x10]
mov byte [esp + 0x13], 0
push 0
push ebx
call fcn.0043cf40
add esp, 8
lea ecx, [esp + 0x34]
mov dword [esp + 0x9c], 0xffffffff
call fcn.00419de0
mov al, byte [esp + 0x13]
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x90
ret 8