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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1f056700
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x4240
call fcn.1f03e9c0
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
xor esi, esi
mov eax, dword [ebp + 0x14]
mov dword [eax], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x14], esi
mov eax, dword [ebp + 0x10]
mov dword [eax], esi
mov dword [eax + 4], esi
mov ecx, dword [ebp + 0xc]
mov dword [ecx], esi
mov edi, dword [ebp + 8]
cmp word [edi], si
je 0x1f036030
push 0x5c
push edi
call fcn.1f03e1ee
add esp, 8
lea edx, [ebp - 0x2050]
test eax, eax
jne 0x1f035cb6
push 0x1000
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x5c
lea eax, [ebp - 0x2050]
push eax
call fcn.1f03ec16
add esp, 8
cmp eax, esi
je 0x1f035c79
xor ecx, ecx
mov word [eax + 2], cx
mov eax, edi
mov edx, edi
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x1f035c80
sub eax, edx
lea edi, [ebp - 0x2050]
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
cmp cx, si
jne 0x1f035c96
mov ecx, eax
mov esi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor esi, esi
jmp 0x1f035ccf
mov eax, edi
sub edx, edi
lea ebx, [ebx]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, si
jne 0x1f035cc0
push esi
push 0x10000000
push 3
push esi
push 1
push 0x80000000
lea edx, [ebp - 0x2050]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x2c], eax
cmp eax, 0xffffffff
jne 0x1f035d19
lea eax, [ebp - 0x2050]
push eax
push str.File__s_not_found
push 0x1100
lea ecx, [ebp - 0x4250]
push ecx
call fcn.1f03e8e1
add esp, 0x10
jmp 0x1f036030
lea edx, [ebp - 0x50]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
cmp eax, esi
jne 0x1f035d4d
lea eax, [ebp - 0x2050]
push eax
push str.Cant_get_file_size_for__s
push 0x1100
lea ecx, [ebp - 0x4250]
push ecx
call fcn.1f03e8e1
add esp, 0x10
jmp 0x1f036021
mov ebx, dword [ebp - 0x50]
mov edi, dword [ebp - 0x4c]
mov edx, ebx
or edx, edi
je 0x1f036006
mov dword [ebp - 0x38], esi
xor eax, eax
mov word [ebp + 8], ax
mov byte [ebp + 0xa], al
cmp ebx, 3
mov eax, ebx
jb 0x1f035d75
mov eax, 3
push 0
lea ecx, [ebp - 0x3c]
push ecx
push eax
lea edx, [ebp + 8]
push edx
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1f036021
test edi, edi
ja 0x1f035d9b
cmp ebx, 2
jb 0x1f035db7
cmp byte [ebp + 8], 0xff
jne 0x1f035db7
cmp byte [ebp + 9], 0xfe
jne 0x1f035db7
mov ecx, dword [ebp + 0x14]
mov dword [ecx], 1
mov esi, 2
jmp 0x1f035de6
mov edx, dword [ebp + 0x14]
cmp dword [edx], 0
jne 0x1f035de6
test edi, edi
ja 0x1f035dc8
cmp ebx, 3
jb 0x1f035de6
cmp byte [ebp + 8], 0xef
jne 0x1f035de6
cmp byte [ebp + 9], 0xbb
jne 0x1f035de6
cmp byte [ebp + 0xa], 0xbf
jne 0x1f035de6
mov dword [ebp - 0x38], 1
mov esi, 3
xor eax, eax
cmp esi, ebx
jne 0x1f035df4
cmp eax, edi
je 0x1f036006
push 1
push 0
mov eax, esi
sub eax, dword [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
sub ebx, esi
mov eax, 0
sbb edi, eax
mov dword [ebp - 0x24], ebx
mov esi, edi
mov dword [ebp - 0x20], esi
mov dword [ebp - 4], eax
lea edx, [ebx + 2]
push edx
call fcn.1f03e832
add esp, 4
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x30], eax
mov edi, ebx
mov dword [ebp - 0x1c], edi
mov eax, esi
mov dword [ebp - 0x18], eax
test eax, eax
ja 0x1f035e4b
test edi, edi
jbe 0x1f035e9e
test eax, eax
jb 0x1f035e57
ja 0x1f035e4b
cmp edi, 0xffffffff
jbe 0x1f035e57
or esi, 0xffffffff
mov dword [ebp - 0x44], 0
jmp 0x1f035e5c
mov esi, edi
mov dword [ebp - 0x44], eax
push 0
lea eax, [ebp - 0x3c]
push eax
push esi
mov ecx, dword [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1f035e8d
mov eax, dword [ebp - 0x14]
push eax
call fcn.1f03e80c
add esp, 4
mov dword [ebp - 4], 0xffffffff
jmp 0x1f036021
sub edi, esi
mov dword [ebp - 0x1c], edi
sbb dword [ebp - 0x18], 0
add dword [ebp - 0x30], esi
mov eax, dword [ebp - 0x18]
jmp 0x1f035e38
mov ecx, dword [ebp + 0x14]
cmp dword [ecx], 0
je 0x1f035ec4
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x14]
mov dword [edx], ecx
mov edx, dword [ebp - 0x20]
shrd ebx, edx, 1
shr edx, 1
mov eax, ebx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], edx
jmp 0x1f035fca
mov dword [ebp + 0x14], 0
cmp dword [ebp - 0x38], 0
je 0x1f035ed8
mov dword [ebp + 0x14], 0xfde9
lea eax, [ebx + 1]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.1f03e832
add esp, 4
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov edi, eax
mov dword [ebp - 0x40], edi
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x1c], ebx
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x18], eax
lea ecx, [ecx]
test eax, eax
ja 0x1f035f2a
test ebx, ebx
jbe 0x1f035fb6
test eax, eax
jb 0x1f035f38
ja 0x1f035f2a
cmp ebx, 0x7fffffff
jbe 0x1f035f38
mov esi, 0x7fffffff
mov dword [ebp - 0x44], 0
jmp 0x1f035f3d
mov esi, ebx
mov dword [ebp - 0x44], eax
push esi
push edi
push esi
mov eax, dword [ebp - 0x34]
push eax
push 0
mov ecx, dword [ebp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x1f035f9a
lea edx, [ebp - 0x2050]
push edx
push str.Error_converting_file__s_in_unicode
push 0x1100
lea eax, [ebp - 0x4250]
push eax
call fcn.1f03e8e1
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.1f03e80c
mov esi, dword [ebp + 0xc]
mov eax, dword [esi]
push eax
call fcn.1f03e80c
add esp, 0x18
mov dword [esi], 0
mov dword [ebp - 4], 0xffffffff
jmp 0x1f036021
mov eax, esi
cdq
sub ebx, eax
mov dword [ebp - 0x1c], ebx
sbb dword [ebp - 0x18], edx
lea edi, [edi + esi*2]
mov dword [ebp - 0x40], edi
add dword [ebp - 0x34], esi
mov eax, dword [ebp - 0x18]
jmp 0x1f035f10
mov edx, dword [ebp - 0x14]
push edx
call fcn.1f03e80c
add esp, 4
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
mov eax, dword [ebp - 0x24]
xor edx, edx
mov word [ecx + eax*2], dx
mov dword [ebp - 0x28], 1
mov dword [ebp - 4], 0xffffffff
jmp 0x1f036021
push 2
call fcn.1f03e832
add esp, 4
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
xor edx, edx
mov word [eax], dx
mov dword [ebp - 0x28], 1
mov eax, dword [ebp - 0x2c]
cmp eax, 0xffffffff
je 0x1f036030
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp + 0x10]
mov dword [eax], edx
mov ecx, dword [ebp - 0x20]
mov dword [eax + 4], ecx
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret