Function at 0x4122b9
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
and dword [ebp - 0x24], 0
push edi
xor eax, eax
lea edi, [ebp - 3]
mov byte [ebp - 4], 0
stosw word es:[edi], ax
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4122d9
mov byte [eax], 0
push dword [ebp + 8]
call fcn.00411c73
mov ecx, eax
mov dword [ebp - 0x28], ecx
cmp ecx, 1
jae 0x4122f2
xor eax, eax
jmp 0x4125a2
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x4122fd
mov edi, dword [eax]
jmp 0x412304
and dword [ebp - 0x14], 0
mov edi, dword [ebp - 0x14]
inc ecx
mov eax, 0x100000
push esi
mov esi, 0x1000
cmp ecx, eax
jbe 0x412319
mov dword [ebp - 0xc], eax
jmp 0x412320
mov dword [ebp - 0xc], ecx
cmp ecx, esi
jle 0x412325
mov eax, dword [ebp - 0xc]
jmp 0x412327
mov eax, esi
push ebx
push 1
push eax
call fcn.00452b24
pop ecx
mov ebx, eax
pop ecx
mov dword [ebp - 0x10], ebx
cmp dword [ebp - 0xc], esi
jle 0x41233f
mov esi, dword [ebp - 0xc]
push 1
push esi
call fcn.00452b24
mov esi, eax
mov eax, dword [ebp + 0x18]
pop ecx
pop ecx
mov dword [ebp - 0x20], esi
test eax, eax
je 0x41235b
mov eax, dword [eax]
test eax, eax
jne 0x412376
push 0
push 0x80
push 3
push 0
push 3
push SQLAllocEnv
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
je 0x41251f
and dword [ebp - 0x1c], 0
and dword [ebp - 0x18], 0
cmp edi, dword [ebp - 0x28]
jb 0x4123b4
cmp dword [ebp + 0x18], 0
jne 0x412537
cmp dword [ebp - 8], 0
je 0x412548
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x412548
mov edi, dword [ebp - 0x14]
xor eax, eax
cmp dword [ebp - 0x18], eax
jne 0x41238f
push eax
push eax
push edi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0xc]
push ebx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x412510
add edi, dword [ebp - 0x24]
mov byte [ebp - 4], 0
mov cl, byte [ebx]
mov dword [ebp - 0x14], edi
xor eax, eax
jmp 0x412400
cmp cl, 0xd
je 0x412406
cmp cl, 0xa
je 0x412406
inc eax
mov cl, byte [eax + ebx]
test cl, cl
jne 0x4123f2
jmp 0x412437
mov cl, byte [eax + ebx]
cmp cl, 0xd
jne 0x412428
cmp byte [eax + ebx + 1], 0xa
jne 0x41241c
push 0x467af4
jmp 0x41242d
cmp cl, 0xd
jne 0x412428
push 0x467af0
jmp 0x41242d
push 0x467aec
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 4]
push eax
xor edi, edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [ebx], 0
mov dword [ebp + 8], eax
je 0x4124fc
mov ebx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x10]
inc ebx
cmp ebx, dword [ebp + 0xc]
je 0x412499
cmp dword [ebp + 0x1c], 0
jne 0x412499
cmp byte [ebp - 4], 0
je 0x412490
test esi, esi
je 0x41247d
push dword [ebp + 8]
lea eax, [ebp - 4]
push eax
push esi
call fcn.004549c0
add esp, 0xc
jmp 0x412480
xor eax, eax
inc eax
test eax, eax
jne 0x412490
inc dword [ebp - 0x1c]
add edi, dword [ebp + 8]
inc ebx
add esi, dword [ebp + 8]
jmp 0x412492
inc edi
inc esi
cmp byte [esi], 0
jne 0x412456
jmp 0x4124f9
mov eax, dword [ebp - 0x10]
push 0
lea esi, [edi + eax]
push 0x464928
push esi
call fcn.0044937b
push 0
push 0x464930
push esi
call fcn.0044937b
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
call edi
mov ecx, 0xffff0
cmp eax, ecx
jle 0x4124cf
mov eax, ecx
jmp 0x4124d2
push esi
call edi
lea edi, [eax + 1]
push edi
push esi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
cmp dword [ebp + 0x1c], 0
mov dword [ebp - 0x18], 1
je 0x4124f9
mov eax, dword [ebp + 8]
lea ecx, [eax + edi - 1]
mov eax, dword [ebp + 0x1c]
add dword [eax], ecx
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x28]
mov esi, dword [ebp - 0x20]
cmp dword [ebp - 0x14], eax
jb 0x4123b1
jmp 0x41238f
cmp dword [ebp - 8], 0
je 0x41251f
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x41252a
push ebx
call fcn.00452756
pop ecx
test esi, esi
je 0x412592
push esi
call fcn.00452756
pop ecx
jmp 0x412592
push 4
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x18]
call fcn.00452790
add esp, 0xc
cmp dword [ebp - 0x18], 0
je 0x412576
cmp dword [ebp + 0x10], 0
je 0x412576
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
call edi
lea ecx, [eax + 1]
mov eax, dword [ebp + 0x14]
cmp eax, ecx
jl 0x41256b
push esi
call edi
inc eax
push eax
push esi
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
test ebx, ebx
je 0x412581
push ebx
call fcn.00452756
pop ecx
test esi, esi
je 0x41258c
push esi
call fcn.00452756
pop ecx
cmp dword [ebp - 0x18], 0
jne 0x412596
xor eax, eax
jmp 0x4125a0
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
pop ebx
pop esi
pop edi
leave
ret 0x18