Function at 0x10001336
Capabilities:
Allocate or change rwx memory
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x10001360
cmp dword [ebp - 0x2c], 1
je 0x10001395
cmp dword [ebp - 0x2c], 2
je 0x100013e4
jmp 0x10001431
push 0x104
mov ecx, dword [0x10017850]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x1000137f
push 0xffffffffffffffff
call fcn.100017a9
push 0
push 0x1000a731
call fcn.10009905
mov dword [0x10017844], eax
jmp 0x10001431
push 0x1001516c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x100013b0
push 0xffffffffffffffff
call fcn.100017a9
push 0x104
mov edx, dword [0x10017850]
push edx
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x100013d1
push 0xffffffffffffffff
call fcn.100017a9
push 0
push 0x10009e70
call fcn.10009905
mov dword [0x10017844], eax
jmp 0x10001431
push 0x10015178
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x100013ff
push 0xffffffffffffffff
call fcn.100017a9
push 0x104
mov ecx, dword [0x10017850]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x10001420
push 0xffffffffffffffff
call fcn.100017a9
push 0
push 0x1000a95d
call fcn.10009905
mov dword [0x10017844], eax
push 0
push 0x80
push 3
push 0
push 1
push bind
mov eax, dword [0x10017850]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x10001461
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.100017a9
push 0
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x14]
push eax
call fcn.10001776
test eax, eax
jne 0x1000147d
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.100017a9
push 0
lea edx, [ebp - 0x1c]
push edx
push 0x60
mov eax, dword [0x1001783c]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x100014a2
mov edx, dword [ebp - 0x14]
push edx
call fcn.100017a9
mov eax, dword [0x1001783c]
mov ecx, dword [eax + 0x14]
push ecx
call fcn.1000d575
add esp, 4
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x18], edx
push 0
mov eax, dword [0x1001783c]
mov ecx, dword [eax + 0x18]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call fcn.10001776
test eax, eax
jne 0x100014dd
mov eax, dword [ebp - 0x14]
push eax
call fcn.100017a9
push 0
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [0x1001783c]
mov eax, dword [edx + 0x14]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10001508
mov eax, dword [ebp - 0x14]
push eax
call fcn.100017a9
mov ecx, dword [0x1001783c]
mov edx, dword [ecx + 0x14]
push edx
call fcn.1000d575
add esp, 4
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
mov dword [0x10017800], eax
mov ecx, dword [0x1001783c]
mov edx, dword [ecx + 4]
mov eax, dword [0x1001783c]
add edx, dword [eax]
mov dword [ebp - 8], edx
lea ecx, [ebp - 4]
push ecx
push 0x40
mov edx, dword [0x1001783c]
mov eax, dword [edx + 0x14]
push eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1000155f
mov edx, dword [ebp - 0x14]
push edx
call fcn.100017a9
mov eax, dword [0x1001783c]
mov ecx, dword [eax + 0x14]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 8]
push eax
call fcn.1000d240
add esp, 0xc
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x28]
push edx
call fcn.1000d226
add esp, 4
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [0x1001783c]
mov eax, dword [edx + 0x14]
push eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x100015b3
mov edx, dword [ebp - 0x14]
push edx
call fcn.100017a9
lea eax, [ebp - 4]
push eax
push 4
mov ecx, dword [0x1001783c]
mov edx, dword [ecx + 0x24]
push edx
mov eax, dword [0x1001783c]
mov ecx, dword [eax + 0x20]
mov edx, dword [0x1001783c]
add ecx, dword [edx]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x100015e7
mov eax, dword [ebp - 0x14]
push eax
call fcn.100017a9
mov dword [ebp - 0x10], 1
jmp 0x100015f9
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
cmp dword [ebp - 0x10], 0xd
jge 0x1000163a
mov edx, dword [ebp - 0x10]
mov eax, dword [0x1001783c]
cmp dword [eax + edx*4 + 0x2c], 0
je 0x10001638
push 4
mov ecx, dword [ebp - 0x10]
lea edx, [ecx*4 + 0x10017808]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [0x1001783c]
mov edx, dword [ecx + eax*4 + 0x2c]
mov eax, dword [0x1001783c]
add edx, dword [eax]
push edx
call fcn.1000d240
add esp, 0xc
jmp 0x100015f0
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [0x1001783c]
mov ecx, dword [eax + 0x24]
push ecx
mov edx, dword [0x1001783c]
mov eax, dword [edx + 0x20]
mov ecx, dword [0x1001783c]
add eax, dword [ecx]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x10001670
mov edx, dword [ebp - 0x14]
push edx
call fcn.100017a9
mov esp, ebp
mov eax, dword [ebp - 8]
add esp, 0x84
mov dword [esp + 0x1c], eax
popal
push eax
xor eax, eax
ret