Function at 0x1001a7f0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x100709e8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
push esi
mov esi, dword [esp + 0x38]
push edi
push 0
push 0
push 3
push 0
push 1
push closesocket
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x24], edi
jne 0x1001a846
mov eax, dword [esp + 0x40]
pop edi
pop esi
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
add esp, 0x30
ret 8
mov eax, dword [0x10085048]
push ebx
push ebp
mov dword [esp + 0x10], eax
mov dword [esp + 0x3c], 0
mov dword [esp + 0x44], eax
mov dword [esp + 0x1c], eax
push 0x80
mov byte [esp + 0x40], 2
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov ebp, eax
lea eax, [esp + 0x24]
mov dword [esp + 0x30], ebp
push 0
push eax
push 0x80
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1001aa82
cmp dword [esp + 0x24], 0x80
jne 0x1001aa82
push 0x2e
push esi
call dword [sym.imp.MSVCRT.dll__mbsrchr]
add esp, 8
test eax, eax
je 0x1001a8c7
push eax
lea ecx, [esp + 0x14]
push 0x100865e0
push ecx
call fcn.10003bb0
add esp, 0xc
mov dword [esp + 0x20], 8
mov eax, dword [esp + 0x44]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x1001a913
mov ecx, dword [eax - 0xc]
test ecx, ecx
jl 0x1001a8ec
lea ecx, [esp + 0x44]
call fcn.10001d20
jmp 0x1001a913
mov edx, 0x1009bcc4
test edx, edx
jne 0x1001a8f9
xor eax, eax
jmp 0x1001a904
push 0x1009bcc4
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0x1009bcc4
push eax
lea ecx, [esp + 0x4c]
call fcn.10001e80
mov eax, dword [0x10085048]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov byte [esp + 0x3c], 4
mov edi, 0x10
mov bl, byte [ebp]
lea eax, [esp + 0x1c]
mov byte [esp + 0x28], bl
mov esi, dword [esp + 0x28]
and esi, 0xff
push esi
push str._02X
push eax
call fcn.10003bb0
mov eax, dword [esp + 0x28]
add esp, 0xc
mov ecx, dword [eax - 8]
push eax
push ecx
lea ecx, [esp + 0x4c]
call fcn.1001a600
cmp bl, 0x21
jb 0x1001a97f
cmp bl, 0x7e
ja 0x1001a97f
push esi
lea edx, [esp + 0x18]
push 0x100865d4
push edx
call fcn.10003bb0
add esp, 0xc
jmp 0x1001a9a2
mov eax, 0x10085614
test eax, eax
je 0x1001a993
push 0x10085614
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0x10085614
push eax
lea ecx, [esp + 0x1c]
call fcn.10001e80
mov eax, dword [esp + 0x14]
push eax
mov ecx, dword [eax - 8]
push ecx
lea ecx, [esp + 0x20]
call fcn.1001a600
inc ebp
dec edi
jne 0x1001a92a
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x44]
push eax
mov edx, dword [eax - 8]
push edx
call fcn.1001a600
mov eax, 0x10086420
test eax, eax
je 0x1001a9e2
push 0x10086420
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0x10086420
push eax
lea ecx, [esp + 0x4c]
call fcn.1001a600
mov eax, dword [esp + 0x44]
push eax
mov ecx, dword [eax - 8]
push ecx
lea ecx, [esp + 0x18]
call fcn.1001a600
mov eax, dword [esp + 0x18]
mov ecx, dword [0x1008504c]
mov byte [esp + 0x3c], 3
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x1001aa37
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x1001aa37
mov eax, dword [esp + 0x18]
add eax, 0xfffffff4
push eax
call fcn.1003c010
add esp, 4
mov eax, dword [esp + 0x14]
mov edx, dword [0x1008504c]
mov byte [esp + 0x3c], 2
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x1001aa6b
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x1001aa6b
mov edx, dword [esp + 0x14]
lea eax, [edx - 0xc]
push eax
call fcn.1003c010
add esp, 4
mov eax, dword [esp + 0x20]
dec eax
mov dword [esp + 0x20], eax
jne 0x1001a8cf
mov edi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x30]
push ebp
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x10]
push 0x2d
push eax
call fcn.10019be0
mov edx, dword [esp + 0x18]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
add esp, 8
mov byte [esp + 0x3c], 1
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x48]
pop ebp
not ecx
sub edi, ecx
mov ebx, ecx
mov esi, edi
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
pop ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [edx - 8]
mov edx, dword [0x1008504c]
lea esi, [ecx + eax]
mov eax, dword [esp + 0x14]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x1001ab09
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x1001ab0f
mov edx, dword [esp + 0x14]
lea eax, [edx - 0xc]
push eax
call fcn.1003c010
add esp, 4
jmp 0x1001ab0f
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov eax, dword [esp + 0x3c]
mov edx, dword [0x1008504c]
mov byte [esp + 0x34], 0
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x1001ab3f
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x1001ab3f
mov edx, dword [esp + 0x3c]
lea eax, [edx - 0xc]
push eax
call fcn.1003c010
add esp, 4
mov eax, dword [esp + 8]
mov edx, dword [0x1008504c]
mov dword [esp + 0x34], 0xffffffff
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x1001ab72
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x1001ab72
mov edx, dword [esp + 8]
add edx, 0xfffffff4
push edx
call fcn.1003c010
add esp, 4
mov ecx, dword [esp + 0x2c]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x30
ret 8