Function at 0x402250
Capabilities:
Create process on windows
Get common file path
Read .ini file

Disassembly:
sub esp, 0x894
lea eax, [esp + 0x178]
push ebx
push ebp
push esi
push edi
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea ecx, [esp + 0x188]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [esp + eax + 0x187], 0x5c
jne 0x4022a7
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
lea edx, [esp + 0x188]
push edx
lea eax, [esp + 0x290]
push 0x40708c
push eax
call edi
add esp, 0xc
jmp 0x4022cb
lea ecx, [esp + 0x188]
lea edx, [esp + 0x28c]
push ecx
push 0x40707c
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
xor esi, esi
mov dword [esp + 0x10], esi
push esi
lea eax, [esp + 0x28]
push 0x4070b4
push eax
call edi
add esp, 0xc
lea ecx, [esp + 0x28c]
lea edx, [esp + 0x84]
lea eax, [esp + 0x24]
push ecx
push 0x104
push edx
push 0x409680
push eax
push 0x4070ac
call ebp
mov al, byte [esp + 0x84]
test al, al
je 0x40231b
inc esi
jmp 0x4022d7
mov dword [esp + 0x10], esi
xor esi, esi
mov dword [esp + 0x14], esi
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x20]
push ecx
push edx
push 0
push 0
push 2
push 0
push 2
call sub.WINSPOOL.DRV_EnumPrintersA
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4025f5
mov eax, dword [esp + 0x20]
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
lea ecx, [esp + 0x1c]
mov ebx, eax
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x20]
push ecx
push edx
push eax
push ebx
push 2
push 0
push 2
mov dword [esp + 0x48], ebx
call sub.WINSPOOL.DRV_EnumPrintersA
test eax, eax
je 0x4025f5
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
cmp eax, ecx
jne 0x4023c6
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 5
jbe 0x402325
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x894
ret
xor ecx, ecx
cmp eax, ecx
mov dword [esp + 0x10], ecx
jbe 0x4024ae
add ebx, 4
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
xor esi, esi
push esi
lea ecx, [esp + 0x28]
push 0x4070b4
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edx, [esp + 0x28c]
lea eax, [esp + 0x84]
lea ecx, [esp + 0x24]
push edx
push 0x104
push eax
push 0x409680
push ecx
push 0x4070ac
call ebp
lea edx, [esp + 0x28c]
lea eax, [esp + 0x24]
push edx
push 0
push eax
push 0x4070ac
call ebx
mov al, byte [esp + 0x84]
test al, al
je 0x40247f
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x84]
mov edx, dword [ecx]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40245e
inc esi
jmp 0x4023e7
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
inc eax
add edx, 0x54
cmp eax, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], edx
jae 0x4024ae
jmp 0x4023e5
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x2c]
lea eax, [ecx*8]
sub eax, ecx
lea ecx, [eax + eax*2]
mov eax, dword [edx + ecx*4 + 4]
lea ecx, [esp + 0x84]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov dword [esp + 0x14], 1
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [esp + 0x14], 1
jne 0x4025f5
xor edx, edx
mov ecx, 0x11
mov dword [esp + 0x30], edx
xor eax, eax
lea edi, [esp + 0x40]
mov dword [esp + 0x34], edx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x40]
mov dword [esp + 0x38], edx
push eax
mov dword [esp + 0x40], edx
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
lea ecx, [esp + 0x598]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
lea edx, [esp + 0x598]
push edx
lea eax, [esp + 0x6a0]
push 0x407168
push eax
call edi
add esp, 0xc
lea ecx, [esp + 0x69c]
lea edx, [esp + 0x390]
push ecx
push 0x104
push edx
push 0x409680
push 0x407160
push 0x407154
call ebp
lea eax, [esp + 0x390]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [esp + 0x390]
lea edx, [esp + 0x494]
push ecx
push edx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, esi
dec esi
test eax, eax
je 0x402597
mov al, byte [esp + esi + 0x494]
cmp al, 0x5c
je 0x40258f
cmp al, 0x2f
je 0x40258f
mov ecx, esi
dec esi
test ecx, ecx
jne 0x402577
jmp 0x402597
mov byte [esp + esi + 0x494], 0
lea edx, [esp + 0x390]
lea eax, [esp + 0x7a0]
push edx
push 0x407148
push eax
call edi
add esp, 0xc
lea ecx, [esp + 0x30]
lea edx, [esp + 0x40]
lea eax, [esp + 0x494]
push ecx
push edx
push eax
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x7bc]
push 0
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x4025f5
mov edx, dword [esp + 0x30]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [esp + 0x34]
push eax
call esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x894
ret