Function at 0x1005a45
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.01002e66
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 0x10054cc
push edi
jmp 0x1005a1c
call fcn.01003dbc
cmp dword [0x100a054], ebx
jne 0x100551d
call fcn.01002723
test eax, eax
jne 0x10054ec
push 0x47e
jmp 0x1005a1c
mov eax, dword [0x100a01c]
and eax, 0xffff0000
cmp eax, 0xcab00000
jne 0x1005507
push 0x20000001
jmp 0x1005a1c
test byte [0x100a01f], 0x80
jne 0x1005516
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 0x100374f
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x1005547
push 8
jmp 0x1005a1c
push edi
push dword [0x100ac0c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x100aae4]
cmp eax, ebx
jne 0x1005567
push 0x4c7
jmp 0x1005a1c
cmp dword [0x100a194], ebx
mov esi, dword [sym.imp.USER32.dll_SendDlgItemMessageA]
je 0x10055a1
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 0x10055e1
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 0x1005655
push ebx
push ebx
push 0x100ac20
call fcn.010039ea
mov edi, eax
lea eax, [esp + 0x38]
push eax
push ebx
push 0x1002b56
push 0x1002b2f
push 0x1003a51
push 0x1003a29
push fcn.010039ea
push 0x1002b1c
push fcn.010039cc
call fcn.01005f71
lea ecx, [esp + 0x68]
push ecx
push edi
push eax
mov dword [esp + 0x50], eax
call fcn.01006001
add esp, 0x3c
test eax, eax
je 0x10054fd
cmp dword [0x100a194], ebx
jne 0x1005655
push ebx
push dword [0x100aae4]
call dword [sym.imp.USER32.dll_ShowWindow]
call fcn.01004c6d
cmp dword [0x100a054], ebx
mov edi, 0x100ae80
jne 0x1005756
cmp dword [0x100a194], ebx
jne 0x100570d
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 0x1005177
push ebx
push 0x100226b
push 0x100ac20
push dword [esp + 0x2c]
call fcn.01006f01
add esp, 0x1c
test eax, eax
je 0x10054fd
cmp dword [0x101b0c0], ebx
jne 0x1005747
cmp dword [0x100aae4], ebx
je 0x100555d
cmp dword [0x100a054], ebx
je 0x10057f5
xor ebp, ebp
inc ebp
push edi
push 0x100252c
push 0x100ad60
call fcn.01002ab9
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 0x10054fd
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [0x100a050], eax
inc eax
push eax
call fcn.010039cc
cmp eax, ebx
pop ecx
mov dword [0x100a04c], eax
je 0x10057db
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 0x10057db
mov eax, dword [0x100a050]
cmp dword [esp + 0x14], eax
jne 0x10057db
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 0x10054fd
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [0x100a048], ebx
je 0x1005818
cmp dword [0x100a004], ebx
je 0x1005818
push dword [0x100a04c]
call fcn.01004433
test eax, eax
je 0x10054fd
cmp dword [0x100ad5c], ebx
je 0x100598d
cmp dword [0x100a18c], ebx
jne 0x100598d
cmp dword [0x100a194], ebx
jne 0x100584b
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.010035d9
mov eax, dword [0x100aaec]
cmp byte [eax], bl
mov ebp, 0x100b0c0
jne 0x10058af
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 0x10058a8
cmp eax, esi
jb 0x10058eb
push 0xffffffffffffffff
jmp 0x1005a1c
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 0x10058b8
mov eax, dword [0x100a188]
mov esi, eax
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10058c9
mov edi, ebp
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x10058d5
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 0x10058a8
cmp dword [0x100a194], ebx
jne 0x1005946
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.01002772
cmp dword [esp + 0x10], 0xcabf00d1
jne 0x1005986
mov dword [esp + 0x10], ebx
jmp 0x10059cc
call fcn.01002c44
jmp 0x10059cc
cmp dword [0x101b0c0], ebx
jne 0x10059cc
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 0x1005a21
mov esi, 0x40000000
test esi, eax
jne 0x1005a17
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.0100377b
test eax, eax
mov eax, dword [0x100a5a8]
jne 0x1005a13
or eax, esi
mov dword [0x100a5a8], eax
test esi, eax
je 0x1005a21
push 0x20000007
call fcn.0111e000
cmp dword [0x100a060], ebx
je 0x1005a3a
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 0x100545d