Function at 0x404260
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x32c
mov eax, dword [0x40e060]
push ebx
push esi
mov esi, dword [ebp + 0x10]
test esi, esi
mov dword [esp + 0x330], eax
mov eax, dword [ebp + 0x14]
mov ebx, ecx
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], eax
je 0x4042ab
cmp byte [esi], 0
je 0x4042ab
push str.MSSQLSERVER
push esi
call fcn.004048bf
add esp, 8
test eax, eax
jne 0x4042b4
mov dword [ebx + 0x10], 0
jmp 0x4042c0
push esi
call fcn.0040b005
add esp, 4
mov dword [ebx + 0x10], eax
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x4042d7
push eax
call fcn.00404e43
add esp, 4
mov dword [ebx + 0x14], 0
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x4042ee
push eax
call fcn.00404e43
add esp, 4
mov dword [ebx + 0x18], 0
mov eax, dword [ebx + 0x1c]
test eax, eax
je 0x404305
push eax
call fcn.00404e43
add esp, 4
mov dword [ebx + 0x1c], 0
mov eax, dword [ebx + 0x20]
test eax, eax
je 0x40431c
push eax
call fcn.00404e43
add esp, 4
mov dword [ebx + 0x20], 0
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x1c], ebx
jne 0x404358
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x334]
call fcn.00404e1d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
xor eax, eax
push eax
mov ecx, 0x40
lea edi, [esp + 0x34]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
push ecx
push 0x100
lea edx, [esp + 0x3c]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40462c
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40462c
lea ebx, [esp + 0x130]
dec ebx
mov dword [esp + 0x20], 1
mov dword [esp + 0x18], 0
mov dword [esp + 0x2c], ebx
lea esp, [esp]
lea eax, [esp + 0x30]
push 0xa
push eax
call fcn.00405410
mov edx, eax
add esp, 8
test edx, edx
lea edi, [esp + 0x130]
mov ecx, 0x40
jne 0x40440e
rep stosd dword es:[edi], eax
mov ecx, 0x3f
lea esi, [esp + 0x30]
lea edi, [esp + 0x130]
rep movsd dword es:[edi], dword [esi]
mov cl, byte [esp + 0x12f]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov byte [esp + 0x30], cl
mov ecx, 0x3f
lea edi, [esp + 0x31]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [esp + 0x10], 0xff
stosb byte es:[edi], al
jmp 0x404499
inc edx
mov esi, edx
lea eax, [esp + 0x30]
sub esi, eax
xor eax, eax
rep stosd dword es:[edi], eax
lea ecx, [esi - 2]
mov eax, ecx
shr ecx, 2
mov dword [esp + 0x10], esi
lea esi, [esp + 0x30]
lea edi, [esp + 0x130]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor eax, eax
mov ecx, 0x40
lea edi, [esp + 0x230]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x10]
mov ebx, 0x100
sub ebx, ecx
mov ecx, ebx
mov esi, edx
mov edx, ecx
shr ecx, 2
lea edi, [esp + 0x230]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x40
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
mov ecx, ebx
mov ebx, dword [esp + 0x2c]
mov eax, ecx
shr ecx, 2
lea esi, [esp + 0x230]
lea edi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x130]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4044a3
sub eax, edx
movsx ecx, byte [ebx + eax]
push ecx
call fcn.004055ad
add esp, 4
test eax, eax
je 0x404500
lea ecx, [ecx]
lea eax, [esp + 0x130]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4044d0
sub eax, edx
mov byte [ebx + eax], cl
lea eax, [esp + 0x130]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4044e6
sub eax, edx
movsx edx, byte [ebx + eax]
push edx
call fcn.004055ad
add esp, 4
test eax, eax
jne 0x4044c0
mov al, byte [esp + 0x130]
cmp al, 0x5b
jne 0x40456a
lea eax, [esp + 0x130]
push 0x5d
push eax
call fcn.00405410
add esp, 8
test eax, eax
je 0x404524
mov byte [eax], 0
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x230]
rep stosd dword es:[edi], eax
jmp 0x404540
mov cl, byte [esp + eax + 0x131]
mov byte [esp + eax + 0x230], cl
inc eax
test cl, cl
jne 0x404540
lea ecx, [esp + 0x230]
push ecx
mov ecx, dword [esp + 0x28]
call fcn.00401ac0
mov dword [esp + 0x18], eax
jmp 0x4045a0
test al, al
je 0x4045a0
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40457b
cmp dword [esp + 0x18], eax
jne 0x4045a0
mov edx, dword [ebp + 0x18]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
push edx
push eax
push ecx
mov ecx, dword [esp + 0x30]
lea edx, [esp + 0x13c]
push edx
call fcn.00402d40
mov esi, eax
test esi, esi
jne 0x40461c
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4045e6
mov edi, dword [esp + 0x1c]
push 0
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x13c]
sub ecx, eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x404623
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x4043b0
mov dword [esp + 0x20], 0
jmp 0x4043b0
mov al, byte [esp + 0x30]
test al, al
jne 0x4043b0
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov ecx, dword [esp + 0x334]
call fcn.00404e1d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov edx, dword [esp + 0x1c]
push edx
jmp 0x404635
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
jmp 0x404633
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x334]
mov eax, esi
call fcn.00404e1d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14