Function at 0x1013ec0
Capabilities:
Read file on windows

Disassembly:
mov dword [rsp + 8], ecx
push rdi
mov eax, 0x1030
call fcn.0105fe80
sub rsp, rax
mov rax, qword [0x010667f0]
xor rax, rsp
mov qword [rsp + 0x1028], rax
movzx eax, word [0x01001c50]
mov word [rsp + 0xcc0], ax
lea rax, [rsp + 0xcc2]
mov rdi, rax
xor eax, eax
mov ecx, 0x222
rep stosb byte [rdi], al
movzx eax, word [0x01001c50]
mov word [rsp + 0x870], ax
lea rax, [rsp + 0x872]
mov rdi, rax
xor eax, eax
mov ecx, 0x3fe
rep stosb byte [rdi], al
movzx eax, word [0x01001c50]
mov word [rsp + 0xf00], ax
lea rax, [rsp + 0xf02]
mov rdi, rax
xor eax, eax
mov ecx, 0xfe
rep stosb byte [rdi], al
movzx eax, word [0x01001c50]
mov word [rsp + 0x60], ax
lea rax, [rsp + 0x62]
mov rdi, rax
xor eax, eax
mov ecx, 0x7fe
rep stosb byte [rdi], al
mov dword [rsp + 0xcb0], 0
mov dword [rsp + 0x860], 0
mov dword [rsp + 0xc74], 0
mov dword [rsp + 0x40], 0
mov dword [rsp + 0xc78], 0
mov dword [rsp + 0xc70], 0
mov qword [rsp + 0xef0], 0
mov qword [rsp + 0xca8], 0
mov dword [rsp + 0xca0], 0
mov qword [rsp + 0x48], 0
mov r8d, 0x20
xor edx, edx
lea rcx, [rsp + 0xc80]
call sub.MSVCR80.dll_memset
lea r8, [0x01068274]
mov edx, 0x112
lea rcx, [rsp + 0xcc0]
call fcn.0105ab90
lea r8, [0x010023f0]
mov edx, 0x112
lea rcx, [rsp + 0xcc0]
call fcn.01015bf0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x100080
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 1
mov edx, 0x80000000
lea rcx, [rsp + 0xcc0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0xca8], rax
cmp qword [rsp + 0xca8], 0xffffffffffffffff
je 0x101464c
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xcb0]
mov r8d, 4
lea rdx, [rsp + 0xc74]
mov rcx, qword [rsp + 0xca8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10140ca
lea r9, [0x01001c30]
mov r8d, 0xe9
xor edx, edx
mov ecx, 1
call fcn.01034b80
mov rcx, qword [rsp + 0xca8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x101464c
cmp dword [rsp + 0xc74], 0x6acfc0
jge 0x1014109
mov r9d, dword [rsp + 0xc74]
mov r8d, 0xea
xor edx, edx
mov ecx, 1
call fcn.01034b80
mov rcx, qword [rsp + 0xca8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x101464c
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xcb0]
mov r8d, 4
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0xca8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1014168
lea r9, [0x01001c30]
mov r8d, 0xe9
xor edx, edx
mov ecx, 1
call fcn.01034b80
mov rcx, qword [rsp + 0xca8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x101464c
lea rcx, [rsp + 0xcc0]
call qword [sym.imp.MSVCR80.dll__wcslwr]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x40]
mov r8d, WSACleanup
xor edx, edx
mov ecx, 2
call fcn.01034b80
lea rcx, [0x01066b50]
call qword [0x01069178]
test eax, eax
jne 0x10141d6
cmp dword [0x010689c0], 0
je 0x10141c9
cmp dword [0x01068484], 0
je 0x10141c9
lea rdx, [0x010023c8]
lea rcx, [0x01001b80]
call qword [sym.imp.MSVCR80.dll_wprintf]
lea rcx, [0x01066b50]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x010689c0], 0
je 0x10141fc
cmp dword [0x01068484], 0
je 0x10141fc
lea rdx, [0x010023c8]
lea rcx, [0x01001b48]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov dword [rsp + 0x860], 0
jmp 0x101421a
mov eax, dword [rsp + 0x860]
add eax, 1
mov dword [rsp + 0x860], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x860], eax
jge 0x1014355
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xcb0]
mov r8d, 0x20
lea rdx, [rsp + 0x1000]
mov rcx, qword [rsp + 0xca8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1014350
mov eax, dword [rsp + 0xcb0]
cmp rax, 0x20
jne 0x1014350
mov r8d, 0x7f3
lea rdx, [0x010023c8]
mov ecx, dword [rsp + 0x1008]
call fcn.01014ff0
mov qword [rsp + 0x1010], rax
cmp qword [rsp + 0x1010], 0
je 0x1014350
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xcb0]
mov r8d, dword [rsp + 0x1008]
mov rdx, qword [rsp + 0x1010]
mov rcx, qword [rsp + 0xca8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1014350
mov eax, dword [rsp + 0x1008]
cmp dword [rsp + 0xcb0], eax
jne 0x1014350
lea rdx, [rsp + 0x1000]
lea rcx, [0x01066cd8]
call qword [sym.imp.SQLSVC.dll_SHRecMemAdd]
cmp dword [rsp + 0x1004], 0
jb 0x101432e
cmp dword [rsp + 0x1004], 7
jae 0x101432e
mov eax, dword [rsp + 0x1004]
mov eax, dword [rsp + rax*4 + 0xc80]
add eax, 1
mov ecx, dword [rsp + 0x1004]
mov dword [rsp + rcx*4 + 0xc80], eax
jmp 0x101433f
mov eax, dword [rsp + 0xc9c]
add eax, 1
mov dword [rsp + 0xc9c], eax
mov eax, dword [rsp + 0xc78]
add eax, 1
mov dword [rsp + 0xc78], eax
jmp 0x1014209
lea rcx, [0x01066b50]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x010689c0], 0
je 0x1014388
cmp dword [0x01068484], 0
je 0x1014388
lea rdx, [0x010023c8]
lea rcx, [0x01001b10]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov rcx, qword [rsp + 0xca8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r9d, 0x400
lea r8, [rsp + 0x60]
mov edx, WSACleanup
mov rcx, qword [0x01069158]
call qword [sym.imp.USER32.dll_LoadStringW]
mov dword [rsp + 0xca0], 0
jmp 0x10143d1
mov eax, dword [rsp + 0xca0]
add eax, 1
mov dword [rsp + 0xca0], eax
movsxd rax, dword [rsp + 0xca0]
cmp rax, 8
jae 0x101446c
movsxd rax, dword [rsp + 0xca0]
cmp dword [rsp + rax*4 + 0xc80], 0
je 0x1014467
mov eax, dword [rsp + 0xca0]
add eax, 0x28
mov r9d, 0x200
lea r8, [rsp + 0x870]
mov edx, eax
mov rcx, qword [0x01069158]
call qword [sym.imp.USER32.dll_LoadStringW]
movsxd rax, dword [rsp + 0xca0]
mov eax, dword [rsp + rax*4 + 0xc80]
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0x870]
lea r8, [0x010023b0]
mov edx, 0x80
lea rcx, [rsp + 0xf00]
call fcn.01016110
lea r8, [rsp + 0xf00]
mov edx, 0x400
lea rcx, [rsp + 0x60]
call fcn.01015bf0
jmp 0x10143c0
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCR80.dll_wcslen]
mov qword [rsp + 0xef0], rax
cmp qword [rsp + 0xef0], 2
jb 0x1014499
mov rax, qword [rsp + 0xef0]
mov word [rsp + rax*2 + 0x5c], 0
lea r9, [rsp + 0x60]
xor r8d, r8d
lea rdx, [0x01001bcc]
mov ecx, 2
call fcn.01034b80
cmp dword [rsp + 0x1040], 0
je 0x101464c
lea rcx, [rsp + 0xcc0]
call qword [sym.imp.MSVCR80.dll__wcslwr]
mov rcx, rax
call fcn.010146a0
mov eax, dword [0x01066ce4]
mov ecx, dword [rsp + 0xc78]
sub ecx, eax
mov eax, ecx
mov dword [rsp + 0xc70], eax
mov eax, dword [0x01066ce4]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
je 0x101464c
mov r9d, dword [rsp + 0x40]
mov r8d, 0x76
xor edx, edx
mov ecx, 2
call fcn.01034b80
mov r9d, dword [rsp + 0x40]
mov r8d, pe_nt_image_headers64
xor edx, edx
mov ecx, 2
call fcn.01034b80
lea rcx, [0x01066b50]
call qword [0x01069178]
test eax, eax
jne 0x1014575
cmp dword [0x010689c0], 0
je 0x1014568
cmp dword [0x01068484], 0
je 0x1014568
lea rdx, [0x010023c8]
lea rcx, [0x01001b80]
call qword [sym.imp.MSVCR80.dll_wprintf]
lea rcx, [0x01066b50]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x010689c0], 0
je 0x101459b
cmp dword [0x01068484], 0
je 0x101459b
lea rdx, [0x010023c8]
lea rcx, [0x01001b48]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov dword [rsp + 0x860], 0
jmp 0x10145b9
mov eax, dword [rsp + 0x860]
add eax, 1
mov dword [rsp + 0x860], eax
mov eax, dword [0x01066ce4]
cmp dword [rsp + 0x860], eax
jge 0x1014619
mov edx, dword [rsp + 0x860]
lea rcx, [0x01066cd8]
call qword [sym.imp.SQLSVC.dll_SHRecMemLock]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x1014617
mov rax, qword [rsp + 0x48]
cmp qword [rax + 0x10], 0
je 0x1014603
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax + 0x10]
call fcn.01015770
mov edx, dword [rsp + 0x860]
lea rcx, [0x01066cd8]
call qword [sym.imp.SQLSVC.dll_SHRecMemDelete]
jmp 0x10145a8
lea rcx, [0x01066b50]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x010689c0], 0
je 0x101464c
cmp dword [0x01068484], 0
je 0x101464c
lea rdx, [0x010023c8]
lea rcx, [0x01001b10]
call qword [sym.imp.MSVCR80.dll_wprintf]
cmp dword [rsp + 0x1040], 0
je 0x1014666
mov eax, dword [rsp + 0xc70]
mov dword [rsp + 0x1020], eax
jmp 0x1014674
mov eax, dword [rsp + 0xc78]
mov dword [rsp + 0x1020], eax
mov eax, dword [rsp + 0x1020]
mov rcx, qword [rsp + 0x1028]
xor rcx, rsp
call fcn.01059ab0
add rsp, 0x1030
pop rdi
ret