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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d0e05
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x515080]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocString
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x2c], 0x4ed624
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 4], 0
cmp ebx, 0xffffffff
jne 0x43490d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x434bd1
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
jne 0x43492a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x434bd1
mov dword [ebp - 0x18], 0
mov byte [ebp - 4], 1
lea eax, [edi + 1]
push eax
lea ecx, [ebp - 0x18]
call fcn.00408760
mov esi, dword [ebp - 0x18]
test al, al
jne 0x434952
mov edi, 8
jmp 0x434bbd
push 0
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x434979
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x434bbd
mov ebx, dword [ebp + 0x10]
mov ecx, ebx
call fcn.004037c0
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x434bb8
mov edi, dword [ebp + 0xc]
mov byte [eax + esi], 0
push str.utf_8
push dword [edi]
call fcn.004ab973
add esp, 8
test eax, eax
jne 0x4349b2
push 0xfde9
jmp 0x434bac
push str.utf_16
push dword [edi]
call fcn.004ab973
add esp, 8
test eax, eax
jne 0x434a99
mov ebx, dword [ebp - 0x10]
shr ebx, 1
call fcn.004046f0
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x434c0c
test esi, esi
jne 0x4349ea
test ebx, ebx
jne 0x434c16
mov eax, dword [eax]
push 2
push ebx
mov edi, dword [eax]
mov ecx, edi
call dword [0x4e2514]
mov ecx, dword [ebp - 0x1c]
call edi
mov edi, eax
mov dword [ebp - 0x14], edi
test edi, edi
je 0x434c07
lea eax, [edi + 0x10]
mov dword [ebp - 0x1c], eax
cmp ebx, dword [eax - 8]
jg 0x434c16
mov dword [eax - 0xc], ebx
xor ecx, ecx
add ebx, ebx
mov word [ebx + eax], cx
test ebx, ebx
je 0x434a59
push ebx
test esi, esi
je 0x434a3a
push esi
push eax
call fcn.004a3750
add esp, 0xc
jmp 0x434a59
push 0
push eax
call fcn.004a3cd0
add esp, 0xc
test esi, esi
jne 0x434a59
call fcn.004a715d
mov dword [eax], 0x16
call fcn.004a705f
mov byte [ebp - 4], 3
lea eax, [ebp - 0x1c]
mov ecx, dword [ebp + 0x10]
push eax
call fcn.00409b90
mov byte [ebp - 4], 1
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x434bb8
mov ebx, dword [edi]
push dword [ebp - 0x14]
mov eax, dword [ebx]
mov edi, dword [eax + 4]
mov ecx, edi
call dword [0x4e2514]
mov ecx, ebx
call edi
jmp 0x434bb8
push str.ISO_8859_1
push dword [edi]
call fcn.004ab973
add esp, 8
test eax, eax
jne 0x434ab6
push 0x6faf
jmp 0x434bac
push str.US_ASCII
push dword [edi]
call fcn.004ab973
add esp, 8
test eax, eax
jne 0x434baa
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x1c], eax
call fcn.004046f0
mov dword [ebp - 0x14], eax
test eax, eax
je 0x434c0c
mov eax, dword [eax]
mov edi, dword [eax + 0xc]
mov ecx, edi
call dword [0x4e2514]
mov ecx, dword [ebp - 0x14]
call edi
mov dword [ebp - 0x20], eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x14], edi
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x1c]
test eax, eax
jle 0x434b71
test esi, esi
je 0x434c16
push 0
push 0
push eax
push esi
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ebx, eax
test ebx, ebx
js 0x434c16
mov ecx, dword [ebp - 0x20]
mov edx, 1
sub edx, dword [ecx + 0xc]
mov ecx, dword [ecx + 8]
sub ecx, ebx
or ecx, edx
jge 0x434b4b
push ebx
lea ecx, [ebp - 0x14]
call fcn.00402540
mov edi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
push ebx
push edi
push eax
push esi
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp ebx, dword [edi - 8]
jg 0x434c16
mov dword [edi - 0xc], ebx
xor eax, eax
mov word [edi + ebx*2], ax
mov ebx, dword [ebp + 0x10]
mov byte [ebp - 4], 6
lea eax, [ebp - 0x14]
push eax
mov ecx, ebx
call fcn.00409b90
mov byte [ebp - 4], 1
lea ecx, [edi - 0x10]
or eax, 0xffffffff
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x434bb8
mov ebx, dword [ecx]
push ecx
mov eax, dword [ebx]
mov edi, dword [eax + 4]
mov ecx, edi
call dword [0x4e2514]
mov ecx, ebx
call edi
jmp 0x434bb8
push 0
mov edx, ebx
mov ecx, esi
call fcn.0040dfe0
add esp, 4
mov ebx, dword [ebp - 0x24]
xor edi, edi
mov byte [ebp - 4], 0
push esi
call fcn.004a2092
add esp, 4
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x2c], 0x4ed624
test ebx, ebx
je 0x434bf1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x28], 0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
call fcn.00402740
push 0x80004005
call fcn.00402720
push 0x80070057
call fcn.00402720
int3