Function at 0x40edca
Capabilities:
Read file on windows

Disassembly:
push 0x54
push 0x515aa8
call fcn.0044769c
mov dword [ebp - 0x1c], 0x78
xor ebx, ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x28], ebx
xor edi, edi
inc edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x44], edi
or dword [ebp - 0x3c], 0xffffffff
push edi
lea eax, [ebp - 0x30]
push eax
call fcn.00407d95
pop ecx
pop ecx
test eax, eax
jne 0x40ee19
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1c], eax
jmp 0x40f108
push ebx
push ebx
push 0x51f95c
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x50]
push eax
push str._oi__CALL_DLGetDataUrl__i___i_
push edi
push edi
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x30]
call fcn.004223b7
add esp, 0x24
push 0xfffffffffffffffe
pop esi
test esi, eax
je 0x40ee72
cmp eax, esi
je 0x40ee0b
mov dword [ebp - 0x1c], 0x10d9
jmp 0x40f108
push dword [ebp - 0x20]
call sub.ODBC32.dll_SQLFetch
movzx eax, ax
and eax, esi
test ax, ax
jne 0x40ee9e
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x20]
call fcn.0042288c
pop ecx
pop ecx
cmp eax, ebx
jbe 0x40ee9e
cmp dword [ebp - 0x2c], ebx
je 0x40ee9e
mov dword [ebp - 0x44], ebx
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x20]
call fcn.00422e4a
pop ecx
mov ebx, 0x400
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x28], eax
xor eax, eax
cmp dword [ebp - 0x44], eax
je 0x40efca
lea eax, [ebp + 0x18]
push eax
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x50]
push eax
push str._oi__CALL_DLGetDataPart__i___i___UI___UI_
push edi
push edi
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x30]
call fcn.004223b7
add esp, 0x2c
test esi, eax
je 0x40ef1e
cmp eax, esi
jne 0x40ef12
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1c], eax
jmp 0x40f106
mov dword [ebp - 0x1c], 0x10d9
jmp 0x40f106
push dword [ebp - 0x20]
call sub.ODBC32.dll_SQLFetch
movzx eax, ax
and eax, esi
test ax, ax
je 0x40ef42
push dword [ebp - 0x20]
call sub.ODBC32.dll_SQLMoreResults
test si, ax
je 0x40efbb
jmp 0x40f102
lea eax, [ebp - 0x54]
push eax
push ebx
push dword [ebp - 0x28]
push esi
push edi
push dword [ebp - 0x20]
call sub.ODBC32.dll_SQLGetData
test si, ax
jne 0x40efbb
mov eax, dword [ebp - 0x54]
cmp eax, ebx
jg 0x40ef68
cmp eax, 0xfffffffc
mov dword [ebp - 0x34], eax
jne 0x40ef6b
mov dword [ebp - 0x34], ebx
and dword [ebp - 0x24], 0
and dword [ebp - 4], 0
push dword [ebp - 0x34]
push dword [ebp - 0x28]
push dword [ebp + 0x2c]
call dword [ebp + 0x24]
mov dword [ebp - 0x24], edi
mov dword [ebp - 4], esi
jmp 0x40efb5
cmp dword [ebp - 0x24], 0
jne 0x40ef42
cmp dword [ebp - 0x24], 0
jne 0x40ef1e
jmp 0x40f102
mov ecx, dword [ebp - 0x5c]
cmp dword [ebp - 0x40], ecx
je 0x40efe5
push dword [ebp - 0x2c]
call fcn.00491f20
pop ecx
test al, al
je 0x40f102
xor eax, eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
push eax
push 0x80
push 3
push eax
push edi
push closesocket
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x3c], ebx
cmp ebx, 0xffffffff
je 0x40ef04
lea eax, [ebp - 0x48]
push eax
push ebx
call fcn.004920f0
pop ecx
pop ecx
test eax, eax
je 0x40ef04
mov eax, dword [ebp - 0x44]
cmp eax, dword [ebp + 0x14]
jb 0x40f106
ja 0x40f03f
mov eax, dword [ebp - 0x48]
cmp eax, dword [ebp + 0x10]
jbe 0x40f106
push 0
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push ebx
call fcn.00492120
add esp, 0x14
test eax, eax
je 0x40ef04
mov edx, dword [ebp + 0x18]
mov ecx, edx
sub ecx, dword [ebp - 0x60]
mov eax, dword [ebp + 0x1c]
sbb eax, dword [ebp - 0x5c]
xor ebx, ebx
cmp eax, ebx
ja 0x40f07d
jb 0x40f078
cmp ecx, 0x400
jae 0x40f07d
sub edx, dword [ebp - 0x60]
jmp 0x40f082
mov edx, 0x400
push ebx
lea eax, [ebp - 0x34]
push eax
push edx
push dword [ebp - 0x28]
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40f102
mov eax, dword [ebp - 0x34]
cmp eax, ebx
je 0x40f102
mov ecx, dword [ebp - 0x5c]
cmp ecx, dword [ebp + 0x1c]
ja 0x40f102
jb 0x40f0b1
mov ecx, dword [ebp - 0x60]
cmp ecx, dword [ebp + 0x18]
jae 0x40f102
add dword [ebp - 0x60], eax
adc dword [ebp - 0x5c], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 4], edi
push eax
push dword [ebp - 0x28]
push dword [ebp + 0x2c]
call dword [ebp + 0x24]
mov dword [ebp - 0x24], edi
mov dword [ebp - 4], esi
jmp 0x40f0f8
cmp dword [ebp - 0x24], 0
jne 0x40f05a
and dword [ebp - 0x1c], 0
xor ebx, ebx
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x20]
call fcn.00422e4a
pop ecx
cmp dword [ebp - 0x30], ebx
je 0x40f123
push dword [ebp - 0x30]
call fcn.00407f35
pop ecx
cmp dword [ebp - 0x28], ebx
je 0x40f139
push dword [ebp - 0x28]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 0x3c], 0xffffffff
je 0x40f148
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x24], ebx
je 0x40f155
push ebx
push ebx
push dword [ebp + 0x2c]
call dword [ebp + 0x24]
cmp dword [ebp - 0x2c], ebx
je 0x40f16b
push dword [ebp - 0x2c]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x1c]
call fcn.004476e1
ret