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

Disassembly:
sub esp, 0x84
push ebx
push ebp
push esi
push edi
or edi, 0xffffffff
push edi
xor ebx, ebx
push 0x100ad40
mov dword [esp + 0x18], ebx
mov byte [0x100a9e0], bl
mov dword [0x100ad24], edi
mov dword [0x100a5a8], 0x80000000
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.0125c000
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 0x100540c
push edi
jmp 0x1005949
call fcn.01003cfc
cmp dword [0x100a054], ebx
jne 0x100544a
mov eax, dword [0x100a01c]
and eax, 0xffff0000
cmp eax, 0xcab00000
jne 0x1005434
push 0x20000001
jmp 0x1005949
test byte [0x100a01f], 0x80
jne 0x1005443
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 0x100368e
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x1005474
push 8
jmp 0x1005949
push edi
push dword [0x100ac0c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x100aae4]
cmp eax, ebx
jne 0x1005494
push 0x4c7
jmp 0x1005949
cmp dword [0x100a194], ebx
mov esi, dword [sym.imp.USER32.dll_SendDlgItemMessageA]
je 0x10054ce
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 0x100550e
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 0x1005582
push ebx
push ebx
push 0x100ac20
call fcn.0100392a
mov edi, eax
lea eax, [esp + 0x38]
push eax
push ebx
push 0x1002abc
push 0x1002a95
push 0x1003991
push 0x1003969
push fcn.0100392a
push 0x1002a82
push fcn.0100390c
call fcn.01005e9e
lea ecx, [esp + 0x68]
push ecx
push edi
push eax
mov dword [esp + 0x50], eax
call fcn.01005f2e
add esp, 0x3c
test eax, eax
je 0x100542a
cmp dword [0x100a194], ebx
jne 0x1005582
push ebx
push dword [0x100aae4]
call dword [sym.imp.USER32.dll_ShowWindow]
call fcn.01004bad
cmp dword [0x100a054], ebx
mov edi, 0x100ae80
jne 0x1005683
cmp dword [0x100a194], ebx
jne 0x100563a
mov ebp, 0x104
push ebp
push edi
push 0x20000004
push dword [0x100a05c]
call dword [sym.imp.USER32.dll_LoadStringA]
push ebp
mov ebp, 0x100a8c0
push ebp
push 0x20000006
push dword [0x100a05c]
call dword [sym.imp.USER32.dll_LoadStringA]
push edi
push ebx
push 0xc
push 0x65
push dword [0x100aae4]
call esi
push ebp
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 0x10050b7
push ebx
push 0x100226b
push 0x100ac20
push dword [esp + 0x2c]
call fcn.01006e2e
add esp, 0x1c
test eax, eax
je 0x100542a
cmp dword [0x101b0c0], ebx
jne 0x1005674
cmp dword [0x100aae4], ebx
je 0x100548a
cmp dword [0x100a054], ebx
je 0x1005722
xor ebp, ebp
inc ebp
push edi
push 0x100252c
push 0x100ad60
call fcn.01002a1f
push ebx
push 0x8000000
push 3
push ebx
push ebp
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x100542a
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [0x100a050], eax
inc eax
push eax
call fcn.0100390c
cmp eax, ebx
pop ecx
mov dword [0x100a04c], eax
je 0x1005708
push ebx
lea ecx, [esp + 0x18]
push ecx
push dword [0x100a050]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1005708
mov eax, dword [0x100a050]
cmp dword [esp + 0x14], eax
jne 0x1005708
mov ecx, dword [0x100a04c]
mov dword [0x100a048], 1
mov byte [ecx + eax], bl
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x100a048], ebx
je 0x100542a
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [0x100a048], ebx
je 0x1005745
cmp dword [0x100a004], ebx
je 0x1005745
push dword [0x100a04c]
call fcn.01004373
test eax, eax
je 0x100542a
cmp dword [0x100ad5c], ebx
je 0x10058ba
cmp dword [0x100a18c], ebx
jne 0x10058ba
cmp dword [0x100a194], ebx
jne 0x1005778
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 0x1002574
call esi
push 0x100ac20
push 0x100255c
call esi
push dword [0x100a188]
push 0x1002544
call esi
call fcn.01003518
mov eax, dword [0x100aaec]
cmp byte [eax], bl
mov ebp, 0x100b0c0
jne 0x10057dc
mov esi, 0x10000
push esi
push ebp
push dword [0x100ad5c]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp eax, ebx
mov dword [esp + 0x10], eax
je 0x10057d5
cmp eax, esi
jb 0x1005818
push 0xffffffffffffffff
jmp 0x1005949
mov eax, dword [0x100ad5c]
mov edx, ebp
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
cmp cl, bl
jne 0x10057e5
mov eax, dword [0x100a188]
mov esi, eax
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10057f6
mov edi, ebp
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x1005802
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x11
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 0x10057d5
cmp dword [0x100a194], ebx
jne 0x1005873
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.010026d8
cmp dword [esp + 0x10], 0xcabf00d1
jne 0x10058b3
mov dword [esp + 0x10], ebx
jmp 0x10058f9
call fcn.01002baa
jmp 0x10058f9
cmp dword [0x101b0c0], ebx
jne 0x10058f9
push ebx
push dword [0x100aae4]
call dword [sym.imp.USER32.dll_ShowWindow]
push 0x104
push edi
push 0x20000002
push dword [0x100a05c]
call dword [sym.imp.USER32.dll_LoadStringA]
push 0x10030
push edi
push edi
push dword [0x100aae4]
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [0x100a5a8]
test eax, eax
js 0x100594e
mov esi, 0x40000000
test esi, eax
jne 0x1005944
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.010036ba
test eax, eax
mov eax, dword [0x100a5a8]
jne 0x1005940
or eax, esi
mov dword [0x100a5a8], eax
test esi, eax
je 0x100594e
push 0x20000007
call fcn.010035e6
cmp dword [0x100a060], ebx
je 0x1005967
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 0x100539d