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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x496be8
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x4b900c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x6c], ecx
mov eax, dword [ebp + 8]
xor ebx, ebx
xorps xmm0, xmm0
mov dword [ebp - 0x34], 0
movq qword [ebp - 0x3c], xmm0
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
xor esi, esi
mov dword [ebp - 4], ebx
movq qword [ebp - 0x2c], xmm0
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], esi
xor edi, edi
movq qword [ebp - 0x20], xmm0
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
push edi
push edi
push 3
push edi
push 1
push 0x80000000
push eax
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x68], eax
cmp eax, 0xffffffff
je 0x420a05
lea ecx, [ebp - 0x44]
xorps xmm0, xmm0
push ecx
push eax
movq qword [ebp - 0x44], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x42096f
mov edx, dword [ebp - 0x44]
mov ecx, edx
mov eax, dword [ebp - 0x40]
add ecx, 0xfffffffd
adc eax, 0xffffffff
test eax, eax
ja 0x42096f
jb 0x420869
cmp ecx, 0x20c
ja 0x42096f
lea eax, [ebp - 0x61]
mov byte [ebp - 0x61], 0
push eax
push edx
push 0
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x3c]
call fcn.00420f00
mov esi, dword [ebp - 0x38]
lea eax, [ebp - 0x30]
mov ebx, dword [ebp - 0x3c]
sub esi, ebx
push 0
push eax
push esi
push ebx
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_ReadFile]
movzx ecx, byte [ebx]
movzx eax, byte [ebx + 1]
add eax, ecx
cmp esi, eax
jb 0x42096d
push dword [ebp - 0x30]
lea esi, [ebx + 2]
lea eax, [ecx + esi]
push eax
push esi
push 0
lea ecx, [ebp - 0x2c]
call fcn.00421290
movzx eax, byte [ebx]
lea ecx, [ebp - 0x20]
push dword [ebp - 0x30]
add esi, eax
movzx eax, byte [ebx + 1]
add eax, esi
push eax
push esi
push 0
call fcn.00421290
mov edx, dword [ebp - 0x28]
mov eax, edx
mov esi, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x20]
sub eax, esi
je 0x42096f
mov ecx, dword [ebp - 0x1c]
mov eax, ecx
sub eax, edi
je 0x42096f
cmp byte [edx - 1], 0xfd
lea eax, [edx - 1]
jne 0x42096f
dec ecx
cmp byte [ecx], 0xff
jne 0x42096f
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x6c]
push 0
push 0
push 0x130b
mov edi, dword [eax + 0x19a8]
mov dword [ebp - 0x1c], ecx
mov eax, dword [edi + 8]
push dword [eax + 4]
call esi
lea ecx, [ebp - 0x60]
mov dword [ebp - 0x60], 8
push ecx
push eax
mov eax, dword [edi + 8]
xorps xmm0, xmm0
push 0x133c
movlpd qword [ebp - 0x5c], xmm0
movlpd qword [ebp - 0x54], xmm0
push dword [eax + 4]
movlpd qword [ebp - 0x4c], xmm0
call esi
mov ecx, dword [ebp - 0x48]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.0041d260
mov esi, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x20]
jmp 0x42096f
xor esi, esi
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x4209a9
mov ecx, dword [ebp - 0x18]
mov eax, edi
sub ecx, edi
cmp ecx, 0x1000
jb 0x42099f
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x420a37
push ecx
push edi
call fcn.0047ea92
add esp, 8
test esi, esi
je 0x4209d6
mov ecx, dword [ebp - 0x24]
mov eax, esi
sub ecx, esi
cmp ecx, 0x1000
jb 0x4209cc
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x420a3c
push ecx
push esi
call fcn.0047ea92
add esp, 8
test ebx, ebx
je 0x420a19
mov ecx, dword [ebp - 0x34]
mov eax, ebx
sub ecx, ebx
cmp ecx, 0x1000
jb 0x4209f9
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x420a41
push ecx
push ebx
call fcn.0047ea92
add esp, 8
jmp 0x420a19
push dword [ebp - 0x70]
mov eax, dword [ebp - 0x6c]
push str.Unable_to_open_file__s
push eax
call fcn.00443470
add esp, 0xc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0047e577
mov esp, ebp
pop ebp
ret 4
call fcn.004821b3
call fcn.004821b3
call fcn.004821b3
int3