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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18c
mov eax, dword [0x447004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, edx
push edi
mov edi, ecx
mov dword [ebp - 0x170], ebx
mov ecx, eax
mov dword [ebp - 0x168], eax
and ecx, 0xf
mov dword [ebp - 0x174], ecx
jne 0x407400
mov eax, 3
jmp 0x40740b
xor eax, eax
cmp ecx, 1
setne al
add eax, 3
push 0
xor edx, edx
mov dword [ebp - 0x164], 3
test ecx, ecx
mov dword [ebp - 0x10c], 0x80000000
push 0x80
cmove edx, dword [ebp - 0x164]
push eax
mov dword [ebp - 0x164], 0xc0000000
mov ecx, dword [ebp - 0x164]
cmove ecx, dword [ebp - 0x10c]
push 0
push edx
push ecx
push ebx
mov dword [ebp - 0x178], edx
mov dword [ebp - 0x164], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [edi + 0x414], eax
cmp eax, 0xffffffff
jne 0x4074be
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, 0xa0
test edi, edi
cmove edi, eax
test esi, esi
je 0x4075aa
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x40749b
mov edx, dword [ecx]
mov eax, dword [edx]
add eax, ecx
push eax
mov eax, dword [edx + 4]
call eax
add esp, 4
mov ecx, edi
mov dword [esi], 0x19
call fcn.0041b480
mov dword [esi + 4], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00425576
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x108]
test ebx, ebx
je 0x4074fc
lea ecx, [ebx + 1]
nop dword [eax + eax]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x4074d0
sub ebx, ecx
lea eax, [ebx + 1]
push eax
push dword [ebp - 0x170]
lea eax, [ebp - 0x108]
push eax
call fcn.00426ea0
lea eax, [ebp - 0x108]
add esp, 0xc
add eax, ebx
je 0x40750c
push 5
push str..jrn
push eax
call fcn.00426ea0
add esp, 0xc
mov ebx, dword [ebp - 0x174]
test ebx, ebx
jne 0x40751b
lea eax, [ebx + 3]
jmp 0x407526
xor eax, eax
cmp ebx, 1
setne al
add eax, 3
push 0
push 0x80
push eax
push 0
push dword [ebp - 0x178]
lea eax, [ebp - 0x108]
push dword [ebp - 0x164]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, eax
mov dword [edi + 0x438], ecx
cmp ecx, 0xffffffff
jne 0x4075bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, 0xa0
test ebx, ebx
cmove ebx, eax
test esi, esi
je 0x407592
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x407582
mov edx, dword [ecx]
mov eax, dword [edx]
add eax, ecx
push eax
mov eax, dword [edx + 4]
call eax
add esp, 4
mov ecx, ebx
mov dword [esi], 0x19
call fcn.0041b480
mov dword [esi + 4], eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [edi + 0x414]
call esi
mov dword [edi + 0x414], 0xffffffff
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00425576
mov esp, ebp
pop ebp
ret
test dword [ebp - 0x168], 0x100
je 0x407648
mov edx, esi
mov ecx, edi
call fcn.004084e0
test eax, eax
je 0x4077e9
lea eax, [ebp - 0x110]
push eax
push dword [edi + 0x414]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x407766
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, 0xa0
test ebx, ebx
cmove ebx, eax
test esi, esi
je 0x4077e9
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x407625
mov edx, dword [ecx]
mov eax, dword [edx]
add eax, ecx
push eax
mov eax, dword [edx + 4]
call eax
add esp, 4
mov ecx, ebx
mov dword [esi], 0x19
call fcn.0041b480
mov dword [esi + 4], eax
push dword [edi + 0x438]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
jmp 0x407598
lea eax, [ebp - 0x18c]
mov dword [ebp - 0x17c], 0
push eax
lea eax, [ebp - 0x168]
mov dword [ebp - 0x184], 0
push eax
push 0xc
lea eax, [ebp - 0x11c]
mov dword [ebp - 0x180], 0
push eax
xorps xmm0, xmm0
push ecx
movlpd qword [ebp - 0x18c], xmm0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40769e
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4075da
cmp dword [ebp - 0x168], 0
je 0x4075da
cmp dword [ebp - 0x118], 2
jne 0x4075da
test esi, esi
je 0x4077e9
mov ebx, dword [esi + 4]
lea edx, [ebp - 0x16c]
mov dword [esi], 0x3e8
mov ecx, dword [0x4478b4]
mov dword [ebp - 0x16c], 0
mov dword [ebp - 0x168], 0
push edx
mov eax, dword [ecx]
add eax, 0x4478b4
push 0x10
push eax
mov eax, dword [ecx + 4]
call eax
xor ecx, ecx
add esp, 0xc
test eax, eax
cmovne ecx, dword [ebp - 0x16c]
test ecx, ecx
je 0x407738
mov dword [ecx + 0xc], ebx
mov dword [ecx + 4], str.Db_journal_is_not_commited.
mov dword [ecx + 8], 0x1b
mov dword [ecx], 0x447a04
mov dword [esi + 4], ecx
push dword [edi + 0x438]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
jmp 0x407598
test ebx, ebx
je 0x40774b
mov ecx, dword [ebx]
mov eax, dword [ecx]
add eax, ebx
push eax
mov eax, dword [ecx + 4]
call eax
add esp, 4
mov ecx, 0x4479a8
mov dword [esi + 4], ecx
push dword [edi + 0x438]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
jmp 0x407598
cmp dword [ebp - 0x110], 0
je 0x4077fc
mov ecx, dword [edi + 0x414]
lea edx, [ebp - 0x160]
push esi
push 0
push 0x40
call fcn.0041e180
add esp, 0xc
test eax, eax
je 0x4077e9
mov ecx, dword [ebp - 0x148]
xor eax, eax
cmp dword [ebp - 0x140], 0x53162
setne al
mov dword [edi + 0x424], eax
je 0x4077af
bswap ecx
mov dword [edi + 0x41c], ecx
test ecx, ecx
je 0x4077d5
test ecx, 0x1ff
jne 0x4077d5
cmp ecx, 0x100000
ja 0x4077d5
mov eax, dword [ebp - 0x110]
xor edx, edx
div ecx
jmp 0x407842
push ecx
push str.Corrupted_header__strange_page_size__d.
push 0x3e9
push esi
call fcn.0041c8e0
add esp, 0x10
push dword [edi + 0x438]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
jmp 0x407598
mov eax, dword [edi + 0x41c]
test eax, eax
jne 0x407812
mov dword [edi + 0x41c], 0x1000
jmp 0x407836
cmp eax, 0x200
jae 0x407825
mov dword [edi + 0x41c], 0x200
jmp 0x407836
cmp eax, 0x10000
jbe 0x407836
mov dword [edi + 0x41c], 0x10000
mov dword [edi + 0x424], 0
xor eax, eax
mov ecx, dword [ebp - 4]
mov dword [edi + 0x418], eax
xor eax, eax
test ebx, ebx
mov dword [edi + 0x428], 0
sete al
xor ecx, ebp
mov dword [edi + 0x420], eax
mov eax, 1
pop edi
pop esi
pop ebx
call fcn.00425576
mov esp, ebp
pop ebp
ret