Function at 0x1013085
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x1020204]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor esi, esi
push edi
mov edi, ecx
cmp dword [edi + 0x514], esi
mov dword [ebp - 0x28], edi
mov ebx, edx
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x34], esi
je 0x101325b
cmp dword [edi + 0x51c], esi
je 0x1013418
push 0x2000
push dword [0x1021d74]
call fcn.01018604
cmp eax, esi
mov dword [ebp - 0x34], eax
je 0x101341f
push esi
lea eax, [ebp - 0x2c]
push eax
push 0x2000
push dword [ebp - 0x34]
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x101341f
cmp dword [ebp - 0x2c], esi
jbe 0x101319f
cmp dword [ebp - 0x2c], 0x2000
jne 0x1013111
mov dword [ebp - 0x2c], 0x1fff
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x2c]
mov ebx, dword [sym.imp.msvcrt.dll_strtok]
push 0x10016dc
push eax
mov byte [ecx + eax], 0
call ebx
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x101319d
and dword [ebp - 0x30], 0
push 0x3d
push esi
call dword [sym.imp.msvcrt.dll_strchr]
mov edi, eax
test edi, edi
pop ecx
pop ecx
je 0x1013189
mov byte [edi], 0
inc edi
je 0x1013189
jmp 0x101314f
inc esi
cmp byte [esi], 0x20
je 0x101314e
mov cl, byte [esi]
test cl, cl
mov eax, esi
je 0x1013177
cmp cl, 0x20
je 0x1013167
lea ecx, [eax + 1]
mov dword [ebp - 0x30], ecx
inc eax
mov cl, byte [eax]
test cl, cl
jne 0x101315c
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x1013177
mov byte [eax], cl
push 0x1002224
push esi
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
pop ecx
pop ecx
je 0x10131c9
push 0x10016dc
push 0
call ebx
mov esi, eax
test esi, esi
pop ecx
pop ecx
jne 0x1013131
mov edi, dword [ebp - 0x28]
xor esi, esi
cmp dword [edi + 0x518], esi
mov byte [ebp - 0x24], 0
je 0x1013231
cmp byte [edi + 0x104], 0
je 0x1013418
lea eax, [edi + 0x106]
mov cl, byte [eax]
mov esi, eax
jmp 0x101320d
inc edi
cmp byte [edi], 0x20
je 0x10131c8
mov cl, byte [edi]
mov eax, edi
jmp 0x10131e2
cmp cl, 0x20
je 0x10131df
lea ecx, [eax + 1]
mov dword [ebp - 0x30], ecx
inc eax
mov cl, byte [eax]
test cl, cl
jne 0x10131d4
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x10131ef
mov byte [eax], cl
cmp byte [edi], 0
je 0x101319a
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax + 0x520]
push edi
jmp 0x1013251
cmp cl, 0x5c
je 0x1013211
cmp cl, 0x2f
je 0x1013211
inc esi
mov cl, byte [esi]
test cl, cl
jne 0x1013200
sub esi, eax
cmp esi, 0x1d
jae 0x1013418
push esi
push eax
lea eax, [ebp - 0x24]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov byte [ebp + esi - 0x24], 0
jmp 0x101323d
mov dword [edi + 0x51c], esi
mov dword [0x1021180], esi
cmp byte [ebp - 0x24], 0
je 0x1013418
mov ecx, dword [edi + 0x520]
lea eax, [ebp - 0x24]
push eax
call fcn.01013028
jmp 0x1013418
push 0x2000
push dword [0x1021d74]
call fcn.01018604
cmp eax, esi
mov dword [ebp - 0x34], eax
je 0x101341f
push esi
lea eax, [ebp - 0x2c]
push eax
push 0x2000
push dword [ebp - 0x34]
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x101341f
cmp dword [ebp - 0x2c], esi
je 0x101341f
cmp dword [ebp - 0x2c], 0x2000
jne 0x10132ab
mov dword [ebp - 0x2c], 0x1fff
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x2c]
mov ebx, dword [sym.imp.msvcrt.dll_strtok]
mov edi, 0x1002220
push edi
push eax
mov byte [ecx + eax], 0
call ebx
test eax, eax
pop ecx
pop ecx
je 0x101341f
mov esi, 0x100221c
push esi
push 0
call ebx
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x38], eax
jne 0x10132e8
xor eax, eax
jmp 0x1013435
push edi
push 0
call ebx
test eax, eax
pop ecx
pop ecx
je 0x101341f
push esi
push 0
call ebx
mov edi, eax
test edi, edi
pop ecx
pop ecx
mov dword [ebp - 0x3c], edi
je 0x10132e1
push dword [ebp - 0x38]
mov eax, dword [ebp - 0x28]
mov esi, 0x104
add eax, 0x410
push esi
push eax
call fcn.0101627b
mov eax, dword [ebp - 0x28]
push edi
add eax, esi
push esi
push eax
call fcn.0101627b
add esp, 0x18
cmp byte [edi], 0x2f
jne 0x1013391
cmp byte [edi + 1], 0x2f
jne 0x1013391
mov al, byte [edi + 2]
cmp al, 0x41
jl 0x1013344
cmp al, 0x5a
jle 0x101334c
cmp al, 0x61
jl 0x1013391
cmp al, 0x7a
jg 0x1013391
cmp byte [edi + 3], 0x3a
jne 0x1013391
mov edi, dword [ebp - 0x28]
add edi, 0x208
mov byte [edi], al
mov eax, dword [ebp - 0x28]
mov byte [eax + 0x209], 0x3a
mov eax, dword [ebp - 0x3c]
add eax, 4
push 0x2f
push eax
call dword [sym.imp.msvcrt.dll_strchr]
test eax, eax
pop ecx
pop ecx
je 0x101341f
push eax
mov eax, dword [ebp - 0x28]
push 0x102
add eax, 0x20a
push eax
jmp 0x101339f
push dword [ebp - 0x3c]
mov edi, dword [ebp - 0x28]
add edi, 0x208
push esi
push edi
call fcn.0101627b
add esp, 0xc
push 0x1002214
push esi
push edi
call fcn.01016202
push dword [ebp - 0x38]
push esi
push edi
call fcn.01016202
push 0x1002220
push 0
call ebx
add esp, 0x20
test eax, eax
je 0x101341f
push 0x1002220
push 0
call ebx
test eax, eax
pop ecx
pop ecx
je 0x101341f
push 0x100220c
push 0
call ebx
mov ebx, eax
test ebx, ebx
pop ecx
pop ecx
je 0x101341f
mov eax, dword [ebp - 0x28]
push ebx
add eax, 0x30c
push esi
push eax
call fcn.0101627b
push ebx
push esi
push edi
call fcn.01016202
add esp, 0x18
jmp 0x1013413
cmp byte [edi], 0x2f
jne 0x1013412
mov byte [edi], 0x5c
inc edi
cmp byte [edi], 0
jne 0x101340a
mov dword [ebp - 0x30], 1
push 0x2000
push dword [ebp - 0x34]
push dword [0x1021d74]
call fcn.01018410
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01015dd4
leave
ret