Function at 0x408f20
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 0x41e528
mov eax, dword fs:[0]
push eax
sub esp, 0x100
mov eax, dword [0x425f70]
xor eax, esp
mov dword [esp + 0xf8], eax
push ebx
push esi
push edi
mov eax, dword [0x425f70]
xor eax, esp
push eax
lea eax, [esp + 0x110]
mov dword fs:[0], eax
fldz
xor eax, eax
fst qword [esp + 0x3c]
mov dword [esp + 0x44], eax
fst qword [esp + 0x34]
mov dword [esp + 0x48], eax
fldz
fst dword [esp + 0x1c]
fxch st(1)
mov dword [esp + 0x20], eax
fst qword [esp + 0x54]
fst qword [esp + 0x24]
fst qword [esp + 0x5c]
fxch st(1)
fstp dword [esp + 0x7c]
fst qword [esp + 0x9c]
fstp qword [esp + 0x84]
mov ecx, dword [0x4259fc]
imul ecx, ecx, 0xfaa77e43
mov dword [0x4259fc], ecx
mov dword [esp + 0xc0], 0xf
mov dword [esp + 0xbc], eax
mov byte [esp + 0xac], al
push 0x118
mov dword [esp + 0x11c], eax
call fcn.0040b148
push eax
mov dword [esp + 0x98], eax
call fcn.00403dd0
add esp, 8
lea esp, [esp]
add dword [0x424654], 0xd072b10b
push 0
call fcn.0040b01a
fld dword [0x425d8c]
fsubr qword [0x41f908]
mov ecx, dword [esp + 0x4c]
add esp, 4
cmp edx, ecx
fsub dword [esp + 0x1c]
mov edi, eax
mov dword [esp + 0x94], edi
mov dword [esp + 0x98], edx
fstp qword [0x423570]
fld dword [esp + 0x1c]
fld1
fadd st(1), st(0)
fxch st(1)
fstp dword [esp + 0x1c]
fld dword [0x425d8c]
fsub st(1)
fstp dword [0x425d8c]
jg 0x409064
jl 0x409056
cmp edi, dword [esp + 0x44]
jae 0x409064
xor ecx, ecx
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], ecx
fld qword [esp + 0x5c]
mov eax, edi
fsub qword [0x41f900]
sub eax, dword [esp + 0x44]
mov esi, edx
sbb esi, ecx
fsub qword [0x41f8f8]
mov dword [esp + 0x18], esi
fmul qword [0x424878]
fstp qword [0x424878]
js 0x409aa8
jg 0x4090a1
cmp eax, 0x708
jbe 0x409aa8
fld qword [esp + 0x24]
mov dword [esp + 0x44], edi
fsub qword [0x41f8f0]
mov dword [esp + 0x48], edx
fsub qword [0x41f8e8]
fcomp qword [0x41f8e0]
fnstsw ax
test ah, 1
jne 0x4090fe
fld dword [0x4235b8]
fsub st(1)
fstp dword [0x4235b8]
fsubr qword [esp + 0x34]
fstp qword [esp + 0x34]
fld dword [0x4235b8]
fld qword [esp + 0x34]
faddp st(1)
fld qword [esp + 0x3c]
faddp st(1)
fsubr qword [esp + 0x9c]
fstp qword [esp + 0x9c]
jmp 0x409100
fstp st(0)
shr edi, 9
push 0x408
lea ebx, [edi + 0x55]
push 0x4230d8
mov dword [esp + 0x88], 0
mov dword [esp + 0x58], edi
mov dword [esp + 0x1c], ebx
call fcn.00401d50
push 0xd
push 0x425df4
mov dword [esp + 0x84], eax
call fcn.00401d50
fld qword [0x423518]
fsubr qword [0x41f8d8]
mov esi, eax
push 0xaf1
push 0x423670
fsub qword [0x41f8d0]
mov dword [esp + 0x64], esi
fmul qword [esp + 0x74]
fstp qword [esp + 0x74]
fld qword [0x423518]
fsub qword [0x41f350]
fstp qword [0x423518]
call fcn.00401d50
push 0x31e
push 0x4242c0
mov dword [esp + 0x98], eax
call fcn.00401d50
fld dword [0x423528]
fld dword [0x424d88]
add esp, 0x20
fsubr qword [0x41f8c8]
mov dword [esp + 0x70], eax
fsubp st(1)
fstp dword [0x423528]
fld dword [0x424d88]
fsub qword [0x41f350]
fstp dword [0x424d88]
cmp edi, ebx
je 0x40972c
lea ecx, [ecx]
mov edx, dword [0x427780]
push 0
push edx
call fcn.004010c0
add esp, 8
test eax, eax
jne 0x4091fa
mov eax, dword [0x427788]
mov ecx, dword [0x4272c4]
push eax
push ecx
call fcn.00402bf0
add esp, 8
fld qword [esp + 0x3c]
fadd qword [0x41f350]
fstp qword [esp + 0x3c]
fld dword [esp + 0x1c]
fsub qword [0x41f8c0]
fadd qword [esp + 0x3c]
fcomp qword [0x41f8b8]
fnstsw ax
test ah, 5
jp 0x409231
fld qword [esp + 0x54]
fsub qword [esp + 0x3c]
fstp qword [0x4235d8]
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x78]
push edx
push eax
push ecx
lea edx, [esp + 0xd0]
push edx
call fcn.00403980
fld dword [esp + 0x2c]
fld1
add esp, 0x10
fadd st(1), st(0)
fxch st(1)
fstp dword [esp + 0x1c]
fsubr dword [0x423514]
fstp dword [0x423514]
mov eax, dword [0x425da8]
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
fadd qword [esp + 0x9c]
fsub dword [esp + 0x1c]
fld dword [0x423514]
fsubr qword [0x41f8b0]
fucompp
fnstsw ax
test ah, 0x44
jnp 0x4092bd
mov ecx, dword [0x425c9c]
mov edx, dword [esp + 0x20]
dec dword [esp + 0x20]
inc dword [0x425c9c]
cmp ecx, edx
jle 0x4092bd
fld qword [esp + 0x24]
fsub qword [0x41f8a8]
fstp qword [esp + 0x24]
push 0x8b
push 0x424238
call fcn.00401d50
mov ebx, eax
mov eax, dword [esp + 0x54]
add esp, 8
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4092d7
mov edi, ebx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4092e3
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 + 0xb0]
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xd0]
push ebx
push ecx
call fcn.00408620
dec dword [0x425a5c]
mov edx, dword [0x425a5c]
add edx, 0x5714ef0e
mov dword [esp + 0x40], edx
push 0x8b
fild dword [esp + 0x44]
push 0
push ebx
fstp dword [0x423530]
mov dword [esp + 0x4c], 0
fldz
fstp qword [esp + 0x4c]
call fcn.0040b360
push ebx
call fcn.0040b06b
mov eax, dword [esp + 0xd0]
add esp, 0x24
cmp dword [esp + 0xc0], 0x10
jae 0x409372
lea eax, [esp + 0xac]
mov ecx, dword [esp + 0xbc]
mov edx, dword [esp + 0x74]
push ecx
push eax
push edx
call fcn.00408390
add esp, 0xc
cmp eax, 9
jge 0x4093c4
mov ax, word [0x42362c]
movsx ecx, ax
mov dword [esp + 0x2c], ecx
fild dword [esp + 0x2c]
fsub qword [esp + 0x34]
fadd dword [esp + 0x7c]
fstp dword [esp + 0x7c]
fld qword [esp + 0x34]
fadd qword [0x41f350]
fstp qword [esp + 0x34]
dec word [0x42362c]
jmp 0x4096ab
fld qword [esp + 0x54]
mov edi, 0x10
fsub qword [0x41f350]
fstp qword [esp + 0x54]
fld dword [0x425a70]
fld dword [0x425d90]
fadd qword [esp + 0x54]
mov ecx, dword [esp + 0xac]
fsubp st(1)
fstp dword [0x425a70]
cmp dword [esp + 0xc0], edi
jae 0x409406
lea ecx, [esp + 0xac]
mov edx, dword [ecx]
xor ecx, ecx
cmp ecx, dword [esp + 0x98]
jl 0x4096ab
jg 0x409426
cmp edx, dword [esp + 0x94]
jb 0x4096ab
mov edx, dword [0x425d80]
lea esi, [eax - 1]
mov word [0x425be0], dx
cmp esi, dword [esp + 0xbc]
jbe 0x409444
call fcn.0040bfae
mov eax, dword [esp + 0xac]
cmp dword [esp + 0xc0], edi
jae 0x40945b
lea eax, [esp + 0xac]
mov byte [eax + esi], 0
mov esi, dword [esp + 0xc0]
mov ebx, dword [esp + 0xac]
mov eax, ebx
cmp esi, edi
jae 0x40947a
lea eax, [esp + 0xac]
lea ecx, [esp + 0xc4]
add eax, 8
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4094a4
test dl, dl
je 0x4094a0
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4094a4
add eax, 2
add ecx, 2
test dl, dl
jne 0x409484
xor eax, eax
jmp 0x4094a9
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4096ab
cmp esi, edi
jb 0x40959d
mov edi, ebx
test ebx, ebx
je 0x4094ec
mov eax, ebx
cmp esi, 0x10
jae 0x4094cd
lea eax, [esp + 0xac]
cmp eax, edi
ja 0x4094ec
mov eax, ebx
cmp esi, 0x10
jae 0x4094df
lea eax, [esp + 0xac]
mov ecx, dword [esp + 0xbc]
add eax, ecx
cmp edi, eax
jbe 0x4094f1
call fcn.0040bfae
fld qword [str.PjW_f]
lea esi, [esp + 0xa8]
fmul qword [0x41f8a0]
mov dword [esp + 0x6c], edi
fstp qword [str.PjW_f]
mov edi, edi
mov edx, dword [esp + 0xc0]
mov ebx, dword [esp + 0xac]
mov eax, ebx
cmp edx, 0x10
jae 0x40952c
lea eax, [esp + 0xac]
mov ecx, dword [esp + 0xbc]
lea edi, [eax + ecx]
test edi, edi
je 0x409560
mov eax, ebx
cmp edx, 0x10
jae 0x409548
lea eax, [esp + 0xac]
cmp eax, edi
ja 0x409560
mov eax, ebx
cmp edx, 0x10
jae 0x40955a
lea eax, [esp + 0xac]
add eax, ecx
cmp edi, eax
jbe 0x409565
call fcn.0040bfae
cmp esi, 0xfffffffc
je 0x40957e
test esi, esi
je 0x409579
lea edx, [esp + 0xa8]
cmp esi, edx
je 0x40957e
call fcn.0040bfae
cmp dword [esp + 0x6c], edi
je 0x4095f8
cmp esi, 0xfffffffc
je 0x4095bc
test esi, esi
jne 0x409592
call fcn.0040bfae
cmp dword [esi + 0x18], 0x10
jb 0x4095a9
mov eax, dword [esi + 4]
jmp 0x4095ac
lea edi, [esp + 0xac]
jmp 0x4094bf
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp dword [esp + 0x6c], ecx
jb 0x4095bc
call fcn.0040bfae
mov edx, dword [esp + 0x6c]
mov byte [edx], 0
cmp esi, 0xfffffffc
je 0x4095ef
test esi, esi
jne 0x4095d1
call fcn.0040bfae
cmp dword [esi + 0x18], 0x10
jb 0x4095dc
mov eax, dword [esi + 4]
jmp 0x4095df
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp dword [esp + 0x6c], ecx
jb 0x4095ef
call fcn.0040bfae
inc dword [esp + 0x6c]
jmp 0x409510
fld dword [str.___]
push 0x7e
fld qword [esp + 0x28]
push 0x424238
fadd qword [0x41f898]
fsubp st(1)
fstp dword [str.___]
call fcn.00401d50
xor ebx, ebx
push ebx
push ebx
lea edx, [esp + 0xb8]
mov esi, eax
push edx
lea eax, [esp + 0xd8]
push esi
push eax
call fcn.00408620
fldz
push 0x7e
push ebx
mov dword [esp + 0x50], ebx
fstp qword [esp + 0x50]
push esi
call fcn.0040b360
push esi
call fcn.0040b06b
push 0xc
push 0x425a40
call fcn.00401d50
add esp, 0x34
mov esi, eax
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x409665
sub eax, ecx
push eax
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0xb4]
call fcn.00404fe0
fldz
mov edi, eax
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esp + 0x2c], ebx
fstp qword [esp + 0x2c]
push esi
mov dword [esi + 8], eax
call fcn.0040b06b
mov ecx, dword [esp + 0xc0]
add ecx, 0xfffffff5
add esp, 4
cmp edi, ecx
je 0x4096c0
mov eax, dword [esp + 0x50]
inc eax
mov dword [esp + 0x50], eax
cmp eax, dword [esp + 0x14]
jne 0x4091d0
jmp 0x409728
fld qword [esp + 0x24]
push 0xb
fsub qword [0x41f890]
push edi
lea ecx, [esp + 0xb0]
fsub dword [0x425d3c]
fstp dword [0x4230b4]
fld dword [0x425d3c]
fsub qword [0x41f350]
fstp dword [0x425d3c]
call fcn.00405240
mov dx, word [0x424170]
movsx eax, dx
mov dword [esp + 0x14], eax
mov dword [esp + 0x80], 1
fild dword [esp + 0x14]
fsub qword [0x423518]
fsub qword [0x425a38]
fmul qword [esp + 0x5c]
fstp qword [esp + 0x5c]
mov esi, dword [esp + 0x4c]
fldz
mov ebx, dword [esp + 0x74]
xor edi, edi
push 0x408
push edi
mov dword [esp + 0x1c], edi
fstp qword [esp + 0x1c]
push ebx
call fcn.0040b360
push ebx
call fcn.0040b06b
fldz
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esp + 0x24], edi
fstp qword [esp + 0x24]
push esi
mov byte [esi + 0xc], al
call fcn.0040b06b
fldz
mov esi, dword [esp + 0x84]
push 0x31e
push edi
mov dword [esp + 0x30], edi
fstp qword [esp + 0x30]
push esi
call fcn.0040b360
push esi
call fcn.0040b06b
fldz
mov esi, dword [esp + 0x9c]
push 0xaf1
push edi
mov dword [esp + 0x40], edi
fstp qword [esp + 0x40]
push esi
call fcn.0040b360
push esi
call fcn.0040b06b
fld qword [0x423598]
mov ecx, dword [0x425a9c]
fsub qword [0x41f888]
mov dword [esp + 0x48], ecx
fild dword [esp + 0x48]
fmulp st(1)
call fcn.0040b2b0
mov dword [0x425a9c], eax
fld qword [0x423598]
fadd qword [0x41f350]
push 0x40
lea edx, [esp + 0xfc]
push edi
push edx
fstp qword [0x423598]
call fcn.0040b360
add esp, 0x40
cmp dword [esp + 0x80], edi
je 0x409aaa
mov eax, dword [esp + 0x90]
push 0x708
push eax
call fcn.004022e0
add esp, 8
cmp dword [esp + 0xbc], 0x200
jbe 0x409aaa
push 0x370
call fcn.0040b148
fld qword [esp + 0x38]
fld1
mov ebx, eax
fsub st(1), st(0)
add esp, 4
fxch st(1)
fstp qword [esp + 0x34]
fld qword [esp + 0x34]
fadd qword [0x41f880]
fcomp qword [0x41f878]
fnstsw ax
test ah, 0x41
jne 0x409879
fld qword [esp + 0x24]
fadd qword [esp + 0x3c]
fstp qword [esp + 0x24]
fld qword [esp + 0x3c]
fadd st(1)
fstp qword [esp + 0x3c]
fadd dword [esp + 0x1c]
push ebx
push 0xeb
fstp dword [esp + 0x24]
fld dword [0x4235c4]
fsubr qword [0x41f870]
fsub dword [esp + 0x24]
fmul qword [esp + 0x8c]
fstp qword [esp + 0x8c]
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push ebx
call fcn.00402df0
push 3
push 0x424178
call fcn.00401d50
mov esi, eax
push esi
push ebx
call fcn.0040bb20
fldz
mov edi, eax
xor eax, eax
mov dword [esp + 0x2c], eax
fstp qword [esp + 0x2c]
mov word [esi], ax
push esi
mov byte [esi + 2], al
call fcn.0040b06b
add dword [0x425cc4], 0xf05cd39c
mov eax, dword [esp + 0xc8]
add esp, 0x1c
cmp dword [esp + 0xc0], 0x10
jae 0x40990c
lea eax, [esp + 0xac]
mov ecx, dword [esp + 0xbc]
push edi
push 1
push ecx
push eax
call fcn.0040b9da
push edi
call fcn.0040b7fc
fld qword [esp + 0x70]
fmul qword [esp + 0x68]
add esp, 0x14
push 0x104
lea eax, [ebx + 0x104]
push eax
fstp qword [esp + 0x5c]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x15
push 0x425cd4
call fcn.00401d50
push 0x20
push 0x425aa4
mov edi, eax
call fcn.00401d50
fld qword [esp + 0x94]
fld1
mov esi, eax
fsub st(1), st(0)
fxch st(1)
fstp qword [esp + 0x94]
fadd dword [0x4230a0]
fstp dword [0x4230a0]
fld dword [0x4235c4]
mov edx, dword [0x4259ec]
mov dword [esp + 0x24], edx
fild dword [esp + 0x24]
fadd qword [esp + 0x94]
fsub dword [0x4230a0]
mov eax, dword [0x427780]
push eax
push esi
lea eax, [ebx + 0x104]
fsubp st(1)
push eax
push edi
lea eax, [ebx + 0x208]
fstp dword [0x4235c4]
push 0x168
push eax
call fcn.0040c08a
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 dword [esp + 0x3c], eax
fstp qword [esp + 0x3c]
mov dword [esi + 0x18], eax
push esi
mov dword [esi + 0x1c], eax
call fcn.0040b06b
fldz
xor eax, eax
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], eax
mov dword [esp + 0x40], 0
fstp qword [esp + 0x40]
push edi
mov byte [edi + 0x14], al
call fcn.0040b06b
mov ecx, dword [0x427780]
push 1
push ecx
call fcn.004010c0
lea eax, [ebx + 0x208]
push eax
push ebx
call fcn.00402bf0
add esp, 0x40
push 0x370
push 0
push ebx
call fcn.0040b360
or eax, 0xffffffff
add dword [0x4241ec], eax
mov edx, dword [esp + 0x2c]
mov ecx, dword [0x4241ec]
add dword [esp + 0x2c], eax
add edx, 0x44ca5fd9
sub ecx, 0x4efec60
add esp, 0xc
cmp ecx, edx
jg 0x409a92
fld qword [esp + 0x24]
fadd qword [esp + 0x24]
fstp qword [esp + 0x54]
fld qword [esp + 0x24]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [esp + 0x24]
fsubr qword [esp + 0x24]
fstp qword [esp + 0x24]
push ebx
call fcn.0040b06b
add esp, 4
push 0x15f90
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x409aaa
fstp st(0)
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [0x427780]
push 0
push edx
call fcn.004010c0
add esp, 8
test eax, eax
jne 0x408ff0
mov eax, dword [0x427788]
mov ecx, dword [0x4272c4]
push eax
push ecx
call fcn.00402bf0
jmp 0x408fe9