Function at 0x422c50
Capabilities:
Read file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x46ba6e
push eax
mov dword fs:[0], esp
sub esp, 0xf4
push ebx
push ebp
push esi
mov esi, ecx
push edi
cmp byte [esi + 8], 0xdb
je 0x422c84
xor edi, edi
push edi
call fcn.00422810
add esp, 4
jmp 0x422c86
xor edi, edi
mov eax, dword [esi + 0xc]
cmp eax, edi
je 0x422ca0
mov cl, byte [esi + 9]
test cl, cl
jne 0x422c9d
push eax
call fcn.0045cfdf
add esp, 4
mov dword [esi + 0xc], edi
lea ecx, [esp + 0x44]
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], edi
mov byte [esi + 9], 0
call fcn.00419d20
mov eax, dword [esp + 0x114]
lea ecx, [esp + 0x44]
push eax
mov dword [esp + 0x110], edi
call fcn.00419f30
mov ebp, dword [esp + 0x118]
lea ecx, [esp + 0x44]
push ebp
push ecx
call fcn.0041ba20
mov ebx, eax
add esp, 8
cmp ebx, 0xffffffff
je 0x422dc9
push ebp
push ebx
call fcn.0041c5e0
mov edi, edx
xor ecx, ecx
add esp, 8
cmp edi, ecx
mov dword [esp + 0x20], eax
jg 0x422d0d
jl 0x422d07
cmp eax, ecx
jae 0x422d0d
push ecx
jmp 0x422dc0
mov edx, eax
or edx, edi
jne 0x422d38
push ecx
push ebx
call fcn.0043cf40
add esp, 8
lea ecx, [esp + 0x44]
mov dword [esp + 0x10c], 0xffffffff
call fcn.00419de0
mov al, 1
jmp 0x422f28
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], ecx
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x14]
push ecx
push edx
push edi
push eax
call fcn.00440ca0
mov eax, dword [esp + 0x2c]
add esp, 0x10
test eax, eax
jbe 0x422d82
test ebp, ebp
je 0x422dbe
mov eax, dword [ebp]
push str.Out_of_memory_for_data_buffer
mov ecx, ebp
call dword [eax + 0x10]
mov eax, dword [esp + 0x20]
mov edx, dword [ebp]
push edi
push eax
push str.fileSize
mov ecx, ebp
call dword [edx + 0x30]
jmp 0x422dbe
mov ecx, dword [esp + 0x14]
add ecx, 4
push ecx
call fcn.0045d8e0
mov edx, eax
add esp, 4
test edx, edx
mov dword [esi + 0xc], edx
jne 0x422de4
test ebp, ebp
je 0x422dbe
mov edx, dword [ebp]
push str.Out_of_memory
mov ecx, ebp
call dword [edx + 0x10]
mov ecx, dword [esp + 0x14]
mov eax, dword [ebp]
push ecx
push str.fileSize
mov ecx, ebp
call dword [eax + 0x2c]
push 0
push ebx
call fcn.0043cf40
add esp, 8
lea ecx, [esp + 0x44]
mov dword [esp + 0x10c], 0xffffffff
call fcn.00419de0
xor al, al
jmp 0x422f28
mov eax, dword [esp + 0x14]
mov edi, edx
push 0
lea ecx, [eax + 4]
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
lea edx, [esp + 0x1c]
and ecx, 3
push edx
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x20], 0
mov dword [esi + 0x10], eax
push eax
lea ecx, [eax + 4]
mov eax, dword [esi + 0xc]
push eax
push ebx
mov dword [esi + 0x14], ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
mov byte [esp + 0x13], 1
jne 0x422ee3
test ebp, ebp
je 0x422ede
lea ecx, [esp + 0x28]
call fcn.00416ed0
lea ecx, [esp + 0x28]
mov byte [esp + 0x10c], 1
call fcn.00418200
mov esi, dword [ebp]
lea ecx, [esp + 0x28]
call fcn.00422700
push eax
mov ecx, ebp
call dword [esi + 0x10]
mov eax, dword [esp + 0x114]
mov edx, dword [ebp]
push eax
push str.filename
mov ecx, ebp
call dword [edx + 0x28]
lea ecx, [esp + 0xa4]
call fcn.00419d20
lea ecx, [esp + 0xa4]
mov byte [esp + 0x10c], 2
push ecx
call fcn.0041ae70
mov esi, dword [ebp]
add esp, 4
lea ecx, [esp + 0xa4]
call fcn.0041a4b0
push eax
push str.current_dir
mov ecx, ebp
call dword [esi + 0x28]
lea ecx, [esp + 0xa4]
mov byte [esp + 0x10c], 1
call fcn.00419de0
lea ecx, [esp + 0x28]
mov byte [esp + 0x10c], 0
call fcn.004171c0
mov byte [esp + 0x13], 0
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
cmp edx, eax
je 0x422f05
test ebp, ebp
je 0x422f00
mov eax, dword [ebp]
push str.Failed_to_read_the_entire_file
mov ecx, ebp
call dword [eax + 0x10]
mov byte [esp + 0x13], 0
push 0
push ebx
call fcn.0043cf40
add esp, 8
lea ecx, [esp + 0x44]
mov dword [esp + 0x10c], 0xffffffff
call fcn.00419de0
mov al, byte [esp + 0x13]
mov ecx, dword [esp + 0x104]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x100
ret 8