Function at 0x408cc0
Capabilities:
Get common file path
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41e2f8
mov eax, dword fs:[0]
push eax
sub esp, 0xe8
mov eax, dword [0x426120]
xor eax, esp
mov dword [esp + 0xe0], eax
push ebx
push esi
push edi
mov eax, dword [0x426120]
xor eax, esp
push eax
lea eax, [esp + 0xf8]
mov dword fs:[0], eax
fldz
xor eax, eax
fst dword [esp + 0x6c]
xor ecx, ecx
fst dword [esp + 0x24]
mov dword [esp + 0x44], eax
fldz
mov word [esp + 0x54], ax
fst qword [esp + 0x84]
mov dword [esp + 0x48], eax
fxch st(1)
mov dword [esp + 0xa8], 0xf
mov word [esp + 0x2c], cx
fst dword [esp + 0x40]
fst dword [esp + 0x74]
mov dword [esp + 0xa4], eax
fst dword [esp + 0x30]
mov byte [esp + 0x94], al
fstp dword [esp + 0x28]
fstp qword [esp + 0x5c]
push 0x118
mov dword [esp + 0x104], eax
call fcn.0040b068
push eax
mov dword [esp + 0x7c], eax
call fcn.00403950
add esp, 8
push 0
call fcn.0040ae0a
mov esi, dword [esp + 0x4c]
add esp, 4
cmp edx, esi
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], edx
jg 0x408da9
jl 0x408d9b
cmp eax, dword [esp + 0x44]
jae 0x408da9
xor esi, esi
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], esi
mov ecx, eax
sub ecx, dword [esp + 0x44]
mov edi, edx
sbb edi, esi
mov dword [esp + 0x18], edi
js 0x40969c
jg 0x408dcb
cmp ecx, 0x708
jbe 0x40969c
mov dword [esp + 0x48], edx
movzx edx, word [0x423ff0]
movsx ecx, dx
sub ecx, 0x7f9d2ed9
mov dword [esp + 0x20], ecx
or ecx, 0xffffffff
mov esi, eax
fild dword [esp + 0x20]
mov dword [esp + 0x44], eax
shr esi, 9
push 0x408
fsub qword [0x4237d8]
lea ebx, [esi + 0x55]
push 0x423a68
mov dword [esp + 0x78], 0
fstp dword [esp + 0x2c]
add word [0x423ff0], cx
mov dword [esp + 0x58], esi
fld qword [esp + 0x64]
mov dword [esp + 0x1c], ebx
fmul qword [0x41f8f0]
fstp qword [esp + 0x64]
fld qword [0x423720]
movzx edx, word [esp + 0x5c]
movsx eax, dx
mov edx, 0xdb51e4c9
sub edx, eax
mov dword [esp + 0x28], edx
fild dword [esp + 0x28]
fsubp st(1)
fstp qword [0x423720]
add dword [esp + 0x5c], ecx
call fcn.00402a00
push 0xd
push 0x424000
mov dword [esp + 0x88], eax
call fcn.00402a00
mov edi, eax
mov eax, dword [0x424044]
mov ecx, dword [0x425e60]
imul eax, ecx
push 0xaf1
mov dword [0x425e60], eax
dec dword [0x424044]
push 0x424d80
mov dword [esp + 0x70], edi
call fcn.00402a00
push 0x31e
push 0x425b40
mov dword [esp + 0x40], eax
call fcn.00402a00
add esp, 0x20
mov dword [esp + 0x68], eax
cmp esi, ebx
je 0x40937e
mov edx, dword [0x427920]
push 0
push edx
call fcn.004015c0
add esp, 8
test eax, eax
jne 0x408eea
mov eax, dword [0x427928]
mov ecx, dword [0x427464]
push eax
push ecx
call fcn.004014c0
add esp, 8
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x20]
push edx
push eax
push ecx
lea edx, [esp + 0xb8]
push edx
call fcn.00403260
push 0x8b
push 0x423f08
call fcn.00402a00
mov ebx, eax
mov eax, dword [esp + 0x70]
add esp, 0x18
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408f20
mov edi, ebx
sub eax, esi
dec edi
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408f30
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x2710
mov ecx, eax
push 0
and ecx, 3
lea eax, [esp + 0x98]
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xb8]
push ebx
push ecx
call fcn.00408240
add esp, 0x14
fld dword [esp + 0x24]
fsub qword [0x41f360]
fstp dword [esp + 0x24]
mov dx, word [esp + 0x2c]
movsx eax, dx
add eax, 0x22f9c649
mov dword [esp + 0x34], eax
fild dword [esp + 0x34]
fadd dword [esp + 0x24]
inc dword [esp + 0x2c]
fcomp qword [0x41f8e8]
fnstsw ax
test ah, 1
jne 0x408fb2
fld qword [0x425ae8]
fmul qword [0x41f8e0]
fstp qword [0x425ae8]
jmp 0x408fd5
fld dword [str.eeh]
fld dword [esp + 0x30]
fsub qword [0x41f8d8]
fcompp
fnstsw ax
test ah, 0x41
jne 0x408fd5
fld dword [0x41f8d0]
fstp dword [esp + 0x40]
fldz
push 0x8b
fstp dword [esp + 0x38]
push 0
fldz
push ebx
fstp qword [esp + 0x40]
call fcn.0040b4b0
push ebx
call fcn.0040af8b
mov eax, dword [esp + 0xa4]
mov edi, 0x10
add esp, 0x10
cmp dword [esp + 0xa8], edi
jae 0x409013
lea eax, [esp + 0x94]
mov ecx, dword [esp + 0xa4]
mov edx, dword [esp + 0x78]
push ecx
push eax
push edx
call fcn.00407bb0
add esp, 0xc
cmp eax, 9
jl 0x40934e
mov ecx, dword [esp + 0x94]
cmp dword [esp + 0xa8], edi
jae 0x409049
lea ecx, [esp + 0x94]
mov edx, dword [ecx]
xor ecx, ecx
cmp ecx, dword [esp + 0x80]
jl 0x40934e
jg 0x409066
cmp edx, dword [esp + 0x7c]
jb 0x40934e
lea esi, [eax - 1]
cmp esi, dword [esp + 0xa4]
jbe 0x409077
call fcn.0040bbb9
mov eax, dword [esp + 0x94]
cmp dword [esp + 0xa8], edi
jae 0x40908e
lea eax, [esp + 0x94]
mov byte [eax + esi], 0
mov esi, dword [esp + 0xa8]
mov eax, dword [esp + 0x94]
cmp esi, edi
jae 0x4090ab
lea eax, [esp + 0x94]
lea ecx, [esp + 0xac]
add eax, 8
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4090d5
test dl, dl
je 0x4090d1
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4090d5
add eax, 2
add ecx, 2
test dl, dl
jne 0x4090b5
xor eax, eax
jmp 0x4090da
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40934e
cmp esi, edi
jb 0x4091da
mov edi, dword [esp + 0x94]
test edi, edi
je 0x409136
cmp dword [esp + 0xa8], 0x10
mov eax, dword [esp + 0x94]
jae 0x40910d
lea eax, [esp + 0x94]
cmp eax, edi
ja 0x409136
cmp dword [esp + 0xa8], 0x10
mov eax, dword [esp + 0x94]
jae 0x409129
lea eax, [esp + 0x94]
mov ecx, dword [esp + 0xa4]
add eax, ecx
cmp edi, eax
jbe 0x409142
call fcn.0040bbb9
mov ecx, dword [esp + 0xa4]
lea esi, [esp + 0x90]
mov ebx, edi
jmp 0x409150
mov eax, dword [esp + 0xa8]
mov edx, dword [esp + 0x94]
mov edi, edx
cmp eax, 0x10
jae 0x40916c
lea edi, [esp + 0x94]
add edi, ecx
je 0x40919b
cmp eax, 0x10
mov eax, edx
jae 0x40917e
lea eax, [esp + 0x94]
cmp eax, edi
ja 0x40919b
cmp dword [esp + 0xa8], 0x10
mov eax, edx
jae 0x409195
lea eax, [esp + 0x94]
add eax, ecx
cmp edi, eax
jbe 0x4091a0
call fcn.0040bbb9
cmp esi, 0xfffffffc
je 0x4091b9
test esi, esi
je 0x4091b4
lea eax, [esp + 0x90]
cmp esi, eax
je 0x4091b9
call fcn.0040bbb9
cmp ebx, edi
je 0x409282
cmp esi, 0xfffffffc
je 0x4091f7
test esi, esi
jne 0x4091cf
call fcn.0040bbb9
cmp dword [esi + 0x18], 0x10
jb 0x4091e6
mov eax, dword [esi + 4]
jmp 0x4091e9
lea edi, [esp + 0x94]
jmp 0x4090f5
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp ebx, ecx
jb 0x4091f7
call fcn.0040bbb9
fld dword [esp + 0x40]
mov byte [ebx], 0
fadd qword [0x41f360]
fstp dword [esp + 0x40]
mov edx, dword [0x42319c]
mov dword [esp + 0x34], edx
fild dword [esp + 0x34]
fstp dword [esp + 0x34]
fld dword [esp + 0x40]
fsubr dword [esp + 0x34]
call fcn.0040aee0
mov dword [0x42319c], eax
cmp esi, 0xfffffffc
je 0x409256
test esi, esi
jne 0x40923a
call fcn.0040bbb9
cmp dword [esi + 0x18], 0x10
jb 0x409245
mov eax, dword [esi + 4]
jmp 0x409248
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp ebx, ecx
jb 0x409256
call fcn.0040bbb9
fld dword [esp + 0x24]
inc ebx
fsub qword [0x41f8c8]
fsub qword [esp + 0x84]
fadd qword [esp + 0x84]
mov ecx, dword [esp + 0xa4]
fstp qword [esp + 0x84]
jmp 0x409150
fld qword [0x4238b0]
push 0x7e
fadd qword [0x41f8c0]
push 0x423f08
fsubr qword [0x41f8b8]
fmul qword [esp + 0x64]
fstp qword [esp + 0x64]
call fcn.00402a00
push 0
push 0
lea edx, [esp + 0xa0]
mov esi, eax
push edx
lea eax, [esp + 0xc0]
push esi
push eax
call fcn.00408240
fld dword [esp + 0x88]
fsub dword [esp + 0x4c]
push 0x7e
push 0
push esi
fstp dword [esp + 0x94]
fldz
fstp dword [esp + 0x5c]
fldz
fstp qword [esp + 0x5c]
call fcn.0040b4b0
push esi
call fcn.0040af8b
push 0xc
push 0x423128
call fcn.00402a00
add esp, 0x34
mov esi, eax
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x409306
sub eax, ecx
push eax
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0x9c]
call fcn.00404f40
fldz
mov edi, eax
fstp dword [esp + 0x34]
fldz
xor eax, eax
mov dword [esi], eax
fstp qword [esp + 0x34]
mov dword [esi + 4], eax
push esi
mov dword [esi + 8], eax
call fcn.0040af8b
mov ecx, dword [esp + 0xa8]
add ecx, 0xfffffff5
add esp, 4
cmp edi, ecx
je 0x409363
mov eax, dword [esp + 0x50]
inc eax
mov dword [esp + 0x50], eax
cmp eax, dword [esp + 0x14]
jne 0x408ec0
jmp 0x40937a
push 0xb
push edi
lea ecx, [esp + 0x98]
call fcn.004063e0
mov dword [esp + 0x70], 1
mov edi, dword [esp + 0x58]
fldz
mov esi, dword [esp + 0x78]
push 0x408
fstp dword [esp + 0x18]
fldz
push 0
fstp qword [esp + 0x1c]
push esi
call fcn.0040b4b0
push esi
call fcn.0040af8b
fldz
xor eax, eax
fstp dword [esp + 0x24]
fldz
mov dword [edi], eax
mov dword [edi + 4], eax
fstp qword [esp + 0x24]
mov dword [edi + 8], eax
push edi
mov byte [edi + 0xc], al
call fcn.0040af8b
fldz
mov esi, dword [esp + 0x7c]
fstp dword [esp + 0x28]
fldz
push 0x31e
push 0
fstp qword [esp + 0x30]
push esi
call fcn.0040b4b0
push esi
call fcn.0040af8b
fldz
mov esi, dword [esp + 0x44]
fstp dword [esp + 0x38]
fldz
push 0xaf1
push 0
fstp qword [esp + 0x40]
push esi
call fcn.0040b4b0
push esi
call fcn.0040af8b
fld dword [0x425f68]
call fcn.0040aee0
push 0x40
lea edx, [esp + 0xe4]
push 0
push edx
mov dword [0x4237b0], eax
call fcn.0040b4b0
add esp, 0x40
cmp dword [esp + 0x70], 0
je 0x40969c
mov eax, dword [esp + 0x74]
push 0x708
push eax
call fcn.004035c0
movzx ecx, word [esp + 0x34]
sub ecx, 0x32946af9
add esp, 8
cmp dword [esp + 0xa4], 0x200
mov word [esp + 0x2c], cx
jbe 0x409682
push 0x370
call fcn.0040b068
fld qword [0x425e70]
fld dword [esp + 0x28]
mov edx, dword [0x424c50]
fsubr qword [0x41f8b0]
mov dword [esp + 0x18], edx
add esp, 4
mov ebx, eax
fiadd dword [esp + 0x14]
push ebx
push 0xeb
fsubp st(1)
fstp qword [0x425e70]
dec dword [0x424c50]
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov eax, dword [0x425ffc]
add eax, 0x27c390dd
cmp eax, 0x80ccde00
jne 0x4094e0
fld dword [esp + 0x28]
mov ecx, dword [0x423efc]
fsubr qword [0x41f8a8]
mov dword [esp + 0x14], ecx
fiadd dword [esp + 0x14]
fadd dword [esp + 0x28]
fstp dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push ebx
call fcn.00403060
push 3
push 0x423960
call fcn.00402a00
mov edi, eax
push edi
push ebx
call fcn.0040ba45
fldz
fstp dword [esp + 0x2c]
mov esi, eax
fldz
xor eax, eax
mov word [edi], ax
fstp qword [esp + 0x74]
push edi
mov byte [edi + 2], al
call fcn.0040af8b
mov eax, dword [esp + 0xb0]
add esp, 0x1c
cmp dword [esp + 0xa8], 0x10
jae 0x409539
lea eax, [esp + 0x94]
mov edx, dword [esp + 0xa4]
push esi
push 1
push edx
push eax
call fcn.0040bea6
fld dword [esp + 0x40]
fadd qword [0x41f360]
push esi
fstp dword [esp + 0x44]
fld dword [esp + 0x3c]
fld dword [esp + 0x44]
fadd qword [0x41f8a0]
fsubp st(1)
fstp dword [esp + 0x3c]
call fcn.0040b5eb
inc word [0x423794]
mov ax, word [0x423794]
movsx ecx, ax
add esp, 0x14
add ecx, 0x116bd02b
mov dword [esp + 0x14], ecx
push 0x104
lea eax, [ebx + 0x104]
fild dword [esp + 0x18]
push eax
push 0
fstp qword [esp + 0x68]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x15
push 0x423f94
call fcn.00402a00
push 0x20
push 0x423a20
mov edi, eax
call fcn.00402a00
mov edx, dword [0x427920]
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.0040bc95
fldz
xor eax, eax
fstp dword [esp + 0x3c]
fldz
mov dword [esi], eax
mov dword [esi + 4], eax
fstp qword [esp + 0x3c]
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
push esi
mov dword [esi + 0x1c], eax
call fcn.0040af8b
fld dword [0x41f898]
fstp dword [0x425ea8]
xor eax, eax
fldz
mov dword [edi], eax
mov dword [edi + 4], eax
fstp dword [esp + 0x40]
fldz
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
fstp qword [esp + 0x40]
mov dword [edi + 0x10], eax
push edi
mov byte [edi + 0x14], al
call fcn.0040af8b
mov eax, dword [0x427920]
push 1
push eax
call fcn.004015c0
lea eax, [ebx + 0x208]
push eax
push ebx
call fcn.004014c0
add esp, 0x40
push 0x370
push 0
push ebx
call fcn.0040b4b0
push ebx
call fcn.0040af8b
add esp, 0x10
push 0x15f90
call dword [sym.imp.KERNEL32.dll_Sleep]
fld dword [0x423e90]
fld qword [0x425f38]
fsub qword [0x41f890]
fsubp st(1)
fstp dword [0x423e90]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [0x427920]
push 0
push ecx
call fcn.004015c0
add esp, 8
test eax, eax
jne 0x408d76
mov edx, dword [0x427928]
mov eax, dword [0x427464]
push edx
push eax
call fcn.004014c0
jmp 0x408d73