Function at 0x1005892
Capabilities:
Create process on windows
Create process suspended
Create thread
Delete file
Get file size
Read file on windows
Set environment variable
Terminate process

Disassembly:
sub esp, 0x84
or dword [0x100ad24], 0xffffffff
push ebx
push ebp
push esi
push edi
push 0xffffffffffffffff
xor ebx, ebx
mov edi, 0x80000000
push 0x100ad40
mov dword [esp + 0x18], ebx
mov byte [0x100a9e0], bl
mov dword [0x100a5a8], edi
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
xor ebp, ebp
inc ebp
mov dword [0x100a060], ebp
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [0x100ad58], eax
call fcn.01002dac
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push ebx
push ebx
push ebp
push ebx
call esi
cmp eax, ebx
mov dword [0x100ac04], eax
jne 0x100536f
push 0xffffffffffffffff
jmp 0x1005869
call fcn.01003cdc
cmp dword [0x100a054], ebx
jne 0x10053ac
mov eax, dword [0x100a01c]
and eax, 0xffff0000
cmp eax, 0xcab00000
jne 0x1005397
push 0x20000001
jmp 0x1005869
test dword [0x100a01c], edi
jne 0x10053a5
mov dword [0x100a18c], ebp
and byte [0x100a01f], 0x7f
push ebx
push ebx
push ebx
push ebx
call esi
mov dword [0x100ac0c], eax
lea eax, [esp + 0x18]
push eax
push ebx
push ebx
push 0x100366e
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x10053d6
push 8
jmp 0x1005869
push 0xffffffffffffffff
push dword [0x100ac0c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x100aae4]
cmp eax, ebx
jne 0x10053f7
push 0x4c7
jmp 0x1005869
cmp dword [0x100a194], ebx
mov esi, dword [sym.imp.USER32.dll_SendDlgItemMessageA]
je 0x1005431
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
push dword [0x100aae4]
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [0x100ac08]
push dword [0x100aae4]
call dword [sym.imp.USER32.dll_SetParent]
jmp 0x1005471
push dword [0x100a190]
push ebx
push 0xc
push 0x68
push eax
call esi
mov eax, dword [0x100a018]
add eax, 0xffff
shr eax, 0x10
shl eax, 0x10
push eax
push ebx
push 0x401
push 0x6a
push dword [0x100aae4]
call esi
push ebx
push ebp
push 0x404
push 0x6a
push dword [0x100aae4]
call esi
cmp dword [0x100a054], ebx
jne 0x10054e5
push ebx
push ebx
push 0x100ac20
call fcn.0100390a
mov edi, eax
lea eax, [esp + 0x38]
push eax
push ebx
push 0x1002a9c
push 0x1002a75
push 0x1003971
push 0x1003949
push fcn.0100390a
push 0x1002a62
push fcn.010038ec
call fcn.01005d7f
lea ecx, [esp + 0x68]
push ecx
push edi
push eax
mov dword [esp + 0x50], eax
call fcn.01005e0f
add esp, 0x3c
test eax, eax
je 0x100538d
cmp dword [0x100a194], ebx
jne 0x10054e5
push ebx
push dword [0x100aae4]
call dword [sym.imp.USER32.dll_ShowWindow]
call fcn.01004b0f
cmp dword [0x100a054], ebx
mov ebp, 0x100ae80
jne 0x10055e3
cmp dword [0x100a194], ebx
jne 0x100559d
mov edi, 0x104
push edi
push ebp
push 0x20000004
push dword [0x100a05c]
call dword [sym.imp.USER32.dll_LoadStringA]
push edi
mov edi, 0x100a8c0
push edi
push 0x20000006
push dword [0x100a05c]
call dword [sym.imp.USER32.dll_LoadStringA]
push ebp
push ebx
push 0xc
push 0x65
push dword [0x100aae4]
call esi
push edi
push ebx
push 0xc
push 0x66
push dword [0x100aae4]
call esi
push 0x100ad60
push ebx
push 0xc
push 0x69
push dword [0x100aae4]
call esi
push ebx
push ebx
push 0x402
push 0x6a
push dword [0x100aae4]
call esi
movzx eax, word [esp + 0x3e]
shl eax, 0x10
push eax
push ebx
push 0x401
push 0x6a
push dword [0x100aae4]
call esi
push 5
push dword [0x100aae4]
call dword [sym.imp.USER32.dll_ShowWindow]
push ebx
push ebx
push 0x1005019
push ebx
push 0x100226b
push 0x100ac20
push dword [esp + 0x2c]
call fcn.01006d0f
add esp, 0x1c
test eax, eax
je 0x100538d
cmp dword [0x101b0c0], ebx
jne 0x10055d7
cmp dword [0x100aae4], ebx
je 0x10053ed
cmp dword [0x100a054], ebx
je 0x1005683
push ebp
push 0x1002524
push 0x100ad60
call fcn.010029ff
push ebx
push 0x8000000
push 3
push ebx
push 1
push 0x80000000
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x100538d
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [0x100a050], eax
inc eax
push eax
call fcn.010038ec
cmp eax, ebx
pop ecx
mov dword [0x100a04c], eax
je 0x1005669
push ebx
lea ecx, [esp + 0x18]
push ecx
push dword [0x100a050]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1005669
mov eax, dword [0x100a050]
cmp dword [esp + 0x14], eax
jne 0x1005669
mov ecx, dword [0x100a04c]
mov dword [0x100a048], 1
mov byte [ecx + eax], bl
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x100a048], ebx
je 0x100538d
push ebp
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [0x100a048], ebx
je 0x10056a6
cmp dword [0x100a004], ebx
je 0x10056a6
push dword [0x100a04c]
call fcn.01004353
test eax, eax
je 0x100538d
cmp dword [0x100ad5c], ebx
je 0x10057da
cmp dword [0x100a18c], ebx
jne 0x10057da
cmp dword [0x100a194], ebx
jne 0x10056d9
push dword [0x100aaec]
push ebx
push 0xc
push 0x68
push dword [0x100aae4]
call esi
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push 0x100ad60
push 0x1002554
call esi
push 0x100ac20
push 0x100253c
call esi
call fcn.010034f8
mov eax, dword [0x100ad5c]
mov esi, ebp
sub esi, eax
mov cl, byte [eax]
mov byte [esi + eax], cl
inc eax
cmp cl, bl
jne 0x1005705
mov eax, dword [0x100a188]
mov esi, eax
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x1005716
mov edi, ebp
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x1005722
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x11
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop ecx
xor eax, eax
lea edi, [esp + 0x50]
rep stosd dword es:[edi], eax
inc eax
mov dword [esp + 0x7c], eax
mov word [esp + 0x80], ax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x54]
push eax
push dword [0x101b0c4]
mov dword [esp + 0x5c], 0x44
push ebx
push 0x20
push ebx
push ebx
push ebx
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x1005368
cmp dword [0x100a194], ebx
jne 0x1005793
push ebx
push dword [0x100aae4]
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [esp + 0x1c]
push 0xffffffffffffffff
push eax
mov dword [0x100ad2c], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.010026b8
cmp dword [esp + 0x10], 0xcabf00d1
jne 0x10057d3
mov dword [esp + 0x10], ebx
jmp 0x1005819
call fcn.01002b8a
jmp 0x1005819
cmp dword [0x101b0c0], ebx
jne 0x1005819
push ebx
push dword [0x100aae4]
call dword [sym.imp.USER32.dll_ShowWindow]
push 0x104
push ebp
push 0x20000002
push dword [0x100a05c]
call dword [sym.imp.USER32.dll_LoadStringA]
push 0x10030
push ebp
push ebp
push dword [0x100aae4]
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [0x100a5a8]
test eax, eax
js 0x100586e
mov esi, 0x40000000
test esi, eax
jne 0x1005864
push dword [0x100a5ac]
mov ecx, eax
shr ecx, 4
and ecx, 1
push 0x100a5b0
push ecx
mov ecx, eax
shr ecx, 1
and ecx, 1
push ecx
and eax, 1
push eax
call fcn.0100369a
test eax, eax
mov eax, dword [0x100a5a8]
jne 0x1005860
or eax, esi
mov dword [0x100a5a8], eax
test esi, eax
je 0x100586e
push 0x20000007
call fcn.010035c6
cmp dword [0x100a060], ebx
je 0x1005887
push 0x100ad40
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov dword [0x100a060], ebx
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_ExitProcess]
jmp 0x10052ff