Function at 0x4000ab30
Capabilities:
Accept command line arguments
Get system information on windows
Get thread local storage value
Parse pe header
Resolve function by parsing pe exports
Suspend thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x84
push ebx
push esi
mov esi, eax
mov eax, dword [0x40075970]
push edi
push eax
mov dword [esp + 0x20], 0xeeeeeeee
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x18], eax
test eax, eax
je 0x4000ab64
cmp eax, 0xeeeeeeee
jne 0x4000ab72
mov eax, 0x7dff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
call fcn.4000bb30
cmp eax, 0x7d00
jne 0x4000b211
call fcn.40011aa0
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call fcn.40011aa0
add esp, 4
push 0x40
lea ecx, [esp + 0x54]
push 0
push ecx
call fcn.40001a40
mov edx, dword [esi + 0x14]
mov eax, dword [esi]
add edx, 4
add esp, 0xc
lea ecx, [esp + 0x50]
mov dword [esp + 0x78], edx
mov edx, dword [eax + 4]
push ecx
mov ecx, esi
call edx
cmp eax, 0x7d00
jne 0x4000b211
mov eax, dword [esi + 0x5c]
mov ecx, dword [eax + 4]
mov edi, dword [eax + 8]
push ecx
call fcn.40009ff0
mov eax, dword [esi + 0x5c]
mov edx, dword [eax + 0x14]
mov eax, dword [eax + 8]
mov ecx, dword [esi + 0x50]
add esp, 4
push edx
lea edi, [esi + 0x44]
push edi
push eax
call fcn.40013630
cmp eax, 0x7d00
jne 0x4000b211
mov eax, dword [edi]
add eax, 0x2c
mov eax, dword [eax + 0xc]
test eax, eax
je 0x4000ac0f
mov eax, dword [eax + 0x34]
jmp 0x4000ac11
xor eax, eax
mov ecx, dword [esi + 0x38]
mov dword [ecx + 8], eax
mov edx, dword [esi + 0x50]
mov edi, dword [esi + 0x38]
push edx
call fcn.40014a70
push 0x24
mov dword [edi + 0xc], eax
mov eax, dword [esi + 0x50]
mov edi, dword [eax + 0x14]
lea ecx, [esp + 0x30]
push 0
push ecx
call fcn.40001a40
add esp, 0xc
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [esi + 0x38]
mov ecx, dword [eax + 0xc]
mov edx, dword [esp + 0x30]
mov eax, ecx
lea edx, [ecx + edx - 1]
shr eax, 0xc
shr edx, 0xc
cmp eax, edx
ja 0x4000ac8f
sub edi, ecx
and edi, 0xfffff000
mov ecx, eax
shl ecx, 0xc
shr ecx, 0xc
mov ebx, dword [ecx*4 + 0x40077248]
lea ecx, [ecx*4 + 0x40077248]
and ebx, 0xfff
or ebx, edi
inc eax
mov dword [ecx], ebx
cmp eax, edx
jbe 0x4000ac6a
mov eax, dword [esi + 0x50]
call fcn.40014b40
mov eax, dword [esp + 0x78]
mov dword [esp + 0x28], eax
mov eax, dword [esi + 0x50]
mov edi, str.ntdll.dll
call fcn.40014090
mov ecx, dword [0x40477438]
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0x10
push 0
push ecx
mov dword [esp + 0x30], eax
call ebx
test eax, eax
je 0x4000acde
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], 0xffffffff
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [esp + 0x10], eax
jmp 0x4000ace6
mov dword [esp + 0x10], 0
mov eax, dword [esi + 0x50]
mov edi, 0x40025a8c
call fcn.40014090
mov edx, dword [0x40477438]
push 0x10
push 0
push edx
mov dword [esp + 0x20], eax
call ebx
test eax, eax
je 0x4000ad1d
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], 0xffffffff
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov edi, eax
jmp 0x4000ad1f
xor edi, edi
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ebx, dword [esp + 0x10]
mov dword [ebx + 8], eax
test eax, eax
je 0x4000ad75
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4000ad75
mov edx, dword [eax + 0x3c]
add eax, edx
push 0xf8
push eax
mov dword [ebx + 0xc], eax
call fcn.40001d00
test al, al
jne 0x4000ad5f
mov dword [ebx + 0xc], 0
jmp 0x4000ad75
mov eax, dword [ebx + 0xc]
cmp dword [eax], 0x4550
jne 0x4000ad75
mov ecx, 0x10b
cmp word [eax + 0x18], cx
je 0x4000ad8d
mov edx, dword [0x40477438]
push ebx
push 0
push edx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [esp + 0x10], 0
push 0x40025a8c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [edi + 8], eax
test eax, eax
je 0x4000addf
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4000addf
mov edx, dword [eax + 0x3c]
add eax, edx
push 0xf8
push eax
mov dword [edi + 0xc], eax
call fcn.40001d00
test al, al
jne 0x4000adc9
mov dword [edi + 0xc], 0
jmp 0x4000addf
mov eax, dword [edi + 0xc]
cmp dword [eax], 0x4550
jne 0x4000addf
mov ecx, 0x10b
cmp word [eax + 0x18], cx
je 0x4000adf1
mov edx, dword [0x40477438]
push edi
push 0
push edx
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor edi, edi
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0xb0]
mov ebx, dword [esp + 0x28]
cmp ebx, dword [ecx + 4]
jae 0x4000ae74
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4000ae34
cmp dword [esp + 0x24], 0
je 0x4000ae34
mov ecx, dword [eax + 8]
mov edx, dword [ebx]
cmp edx, ecx
jbe 0x4000ae34
call fcn.40007390
add eax, ecx
cmp edx, eax
jae 0x4000ae34
mov eax, dword [esp + 0x24]
mov eax, dword [eax + 0x34]
sub eax, ecx
add eax, edx
mov dword [ebx], eax
test edi, edi
je 0x4000ae62
cmp dword [esp + 0x14], 0
je 0x4000ae62
mov ecx, dword [edi + 8]
mov edx, dword [ebx]
cmp edx, ecx
jbe 0x4000ae62
mov eax, edi
call fcn.40007390
add eax, ecx
cmp edx, eax
jae 0x4000ae62
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 0x34]
sub eax, ecx
add eax, edx
mov dword [ebx], eax
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx + 0xb0]
add ebx, 4
cmp ebx, dword [edx + 4]
jb 0x4000ae04
test edi, edi
je 0x4000aeab
cmp dword [esp + 0x14], 0
je 0x4000aeab
mov eax, dword [edi + 8]
mov ecx, dword [esi + 0x10]
cmp ecx, eax
jbe 0x4000aeab
mov edx, dword [edi + 0xc]
test edx, edx
je 0x4000ae95
mov edx, dword [edx + 0x50]
jmp 0x4000ae97
xor edx, edx
add edx, eax
cmp ecx, edx
jae 0x4000aeab
mov edx, dword [esp + 0x14]
mov edx, dword [edx + 0x34]
sub edx, eax
add edx, ecx
mov dword [esi + 0x10], edx
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4000aec2
push eax
mov eax, dword [0x40477438]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test edi, edi
je 0x4000aed6
mov ecx, dword [0x40477438]
push edi
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esi + 0x44]
add eax, 0x2c
mov eax, dword [eax + 0xc]
test eax, eax
je 0x4000aef7
movzx eax, word [eax + 0x16]
test al, 2
je 0x4000aef7
mov byte [esp + 0xf], 1
test eax, 0x2000
je 0x4000aefc
mov byte [esp + 0xf], 0
mov eax, dword [0x40477460]
mov edx, dword [eax + 0x5c]
cmp byte [edx + 0x1d], 0
jne 0x4000af17
mov ebx, dword [eax + 0x44]
push 0
call fcn.40003250
add esp, 4
mov eax, dword [0x4047746c]
mov edi, dword [ebp + 8]
inc eax
push eax
push edi
mov dword [0x4047746c], eax
lea eax, [esp + 0x28]
push eax
push 1
push 1
lea ecx, [esp + 0x64]
push ecx
mov ecx, dword [esi + 0x44]
call fcn.4000fba0
mov ebx, eax
cmp ebx, 0x7d00
jne 0x4000b20f
cmp byte [esp + 0xf], 0
je 0x4000b0b8
mov eax, dword [esi + 0x44]
cmp byte [eax + 0x17], 0
mov ecx, dword [eax + 0x38]
je 0x4000af7c
test ecx, ecx
je 0x4000af78
mov dx, word [ecx + 0x16]
shr dx, 0xd
and dl, 1
je 0x4000af78
mov eax, dword [eax + 0x20]
jmp 0x4000afa0
mov eax, ecx
jmp 0x4000af95
test ecx, ecx
je 0x4000af92
mov cx, word [ecx + 0x16]
shr cx, 0xd
and cl, 1
je 0x4000af92
mov eax, dword [eax + 0x20]
jmp 0x4000afa0
mov eax, dword [eax + 0x38]
test eax, eax
je 0x4000af9e
mov eax, dword [eax + 0x34]
jmp 0x4000afa0
xor eax, eax
mov edx, dword [esp + 0x78]
mov dword [edx - 0x10], eax
mov eax, dword [esp + 0x78]
mov dword [eax - 0xc], 0
mov ecx, dword [esp + 0x78]
mov dword [ecx - 8], 0
mov edx, dword [esi + 0x1c]
mov eax, dword [edx + 0xc]
mov ecx, dword [esp + 0x78]
mov dword [ecx - 4], eax
mov eax, dword [esi + 0x44]
mov ecx, dword [eax + 0x34]
add eax, 0x2c
test ecx, ecx
je 0x4000aff2
mov edx, dword [eax + 0xc]
mov ebx, dword [edx + 0x28]
add ebx, ecx
push 1
push ebx
call fcn.40001d00
movzx eax, al
neg eax
sbb eax, eax
and eax, ebx
jmp 0x4000aff4
xor eax, eax
mov ecx, dword [esi + 0x44]
mov edx, dword [ecx + 0x34]
mov ecx, dword [ecx + 0x38]
test ecx, ecx
je 0x4000b006
mov ecx, dword [ecx + 0x34]
jmp 0x4000b008
xor ecx, ecx
sub ecx, edx
add ecx, eax
mov eax, dword [0x40477424]
mov dword [esp + 0x68], ecx
mov ebx, ecx
test eax, eax
je 0x4000b06c
mov eax, dword [eax]
mov eax, dword [eax + 0x38]
test eax, eax
je 0x4000b06c
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x4000b06c
push ebx
push 5
call fcn.400034b0
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x4000b06c
mov ecx, dword [ebx + 0xc]
mov eax, dword [0x40477424]
test dword [eax + 0xc], ecx
je 0x4000b05c
mov ecx, dword [eax]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
mov ecx, dword [0x40477438]
push ebx
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
test edi, edi
je 0x4000b07e
mov edx, dword [esi + 0x30]
mov eax, dword [edx + 0xc]
or ecx, 0xffffffff
sub ecx, dword [eax + 0xc]
mov dword [edi], ecx
mov eax, dword [esi + 0x10]
lea edx, [esp + 0x20]
push edx
mov edx, dword [esi + 0x30]
push 0
push eax
lea ecx, [esp + 0x5c]
push ecx
push edx
call fcn.4000de90
mov ebx, eax
mov eax, dword [esp + 0x88]
mov dword [esp + 0x1c], eax
test edi, edi
je 0x4000b0b8
mov ecx, dword [esi + 0x30]
mov edx, dword [ecx + 0xc]
or eax, 0xffffffff
sub eax, dword [edx + 0xc]
sub eax, dword [edi]
mov dword [edi], eax
mov ecx, dword [0x40075970]
push ecx
mov byte [0x40477428], 1
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4000b10a
cmp eax, 0xeeeeeeee
je 0x4000b10a
push 0x24
push 0
lea edx, [esp + 0x34]
push edx
call fcn.40001a40
add esp, 0xc
mov eax, edx
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov edx, dword [esp + 0x30]
mov ecx, esi
call fcn.4000b5d0
mov edi, eax
call fcn.4000b5d0
mov ecx, edi
call fcn.40001260
mov ecx, dword [esi + 0x60]
mov edi, dword [esp + 0x20]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x4000b138
mov eax, dword [esi + 0x60]
mov edx, dword [esp + 0x1c]
push eax
mov dword [esi + 0xc], ebx
mov dword [esi + 0x64], edi
mov dword [esi + 8], edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
push esi
call fcn.4000bd70
test al, al
jne 0x4000b164
mov ecx, dword [esi + 0x34]
mov edi, dword [ecx + 4]
test edi, edi
je 0x4000b164
mov ebx, dword [sym.imp.KERNEL32.dll_SuspendThread]
mov edx, dword [edi]
mov eax, dword [edx + 0xd4]
push eax
call ebx
mov edi, dword [edi + 8]
test edi, edi
jne 0x4000b152
mov ecx, dword [0x40477460]
mov edx, dword [ecx + 0x5c]
cmp byte [edx + 0x1d], 0
jne 0x4000b18b
mov ebx, dword [esi + 0x44]
mov edx, ebx
call fcn.4000fee0
test al, al
je 0x4000b18b
push 2
call fcn.40003250
add esp, 4
mov ecx, esi
call fcn.4000b5d0
push 0x24
mov edi, eax
lea eax, [esp + 0x30]
push 0
push eax
call fcn.40001a40
add esp, 0xc
lea ecx, [esp + 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [edi + 0x30]
mov edx, dword [esp + 0x30]
mov ecx, eax
lea edx, [eax + edx - 1]
shr ecx, 0xc
shr edx, 0xc
cmp ecx, edx
ja 0x4000b1f6
mov edi, eax
sub edi, eax
and edi, 0xfffff000
mov eax, ecx
shl eax, 0xc
shr eax, 0xc
mov ebx, dword [eax*4 + 0x40077248]
lea eax, [eax*4 + 0x40077248]
and ebx, 0xfff
or ebx, edi
inc ecx
mov dword [eax], ebx
cmp ecx, edx
jbe 0x4000b1d1
cmp dword [esi + 0x50], 0
je 0x4000b203
mov dword [esi + 0x50], 0
mov eax, dword [esi + 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4