Function at 0x408f00
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 0x41e6c8
mov eax, dword fs:[0]
push eax
sub esp, 0xe0
mov eax, dword [0x425fa0]
xor eax, esp
mov dword [esp + 0xd8], eax
push ebx
push esi
push edi
mov eax, dword [0x425fa0]
xor eax, esp
push eax
lea eax, [esp + 0xf0]
mov dword fs:[0], eax
fldz
xor esi, esi
fst dword [esp + 0x30]
xor ebx, ebx
fldz
xor edi, edi
fst qword [esp + 0x5c]
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], edi
mov dword [esp + 0x40], esi
fst qword [esp + 0x7c]
mov dword [esp + 0x1c], esi
fxch st(1)
fstp dword [esp + 0x14]
mov dword [esp + 0xa0], 0xf
mov dword [esp + 0x34], esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x50], esi
fstp qword [esp + 0x54]
mov dword [esp + 0x9c], esi
mov byte [esp + 0x8c], bl
push 0x118
mov dword [esp + 0xfc], esi
call fcn.0040b471
push eax
mov dword [esp + 0x8c], eax
call fcn.00403cc0
add esp, 8
jmp 0x408fba
xor esi, esi
push esi
call fcn.0040b1da
add esp, 4
cmp edx, edi
mov esi, eax
mov dword [esp + 0x74], esi
mov dword [esp + 0x78], edx
jg 0x408fe3
jl 0x408fd7
cmp esi, ebx
jae 0x408fe3
xor ebx, ebx
xor edi, edi
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], edi
mov eax, esi
sub eax, ebx
mov ecx, edx
sbb ecx, edi
mov dword [esp + 0x28], ecx
js 0x4099e7
jg 0x409002
cmp eax, 0x708
jbe 0x4099e7
mov dword [esp + 0x48], edx
mov edx, dword [0x4239ec]
mov ecx, dword [0x4239ec]
mov eax, 0x2ef3f616
mov dword [esp + 0x44], esi
sub eax, edx
shr esi, 9
add eax, ecx
add dword [esp + 0x40], eax
push 0x408
lea ebx, [esi + 0x55]
push 0x424228
mov dword [esp + 0x78], 0
mov dword [esp + 0x44], esi
mov dword [esp + 0x2c], ebx
call fcn.00401b50
push 0xd
push 0x4235b4
mov dword [esp + 0x7c], eax
call fcn.00401b50
mov edi, eax
push 0xaf1
push 0x424680
mov dword [esp + 0x50], edi
call fcn.00401b50
fld dword [0x423024]
fadd qword [0x41f340]
mov dword [esp + 0x80], eax
fstp dword [0x423024]
mov edx, dword [0x423ee0]
sub edx, 0x2b629cd5
mov dword [esp + 0x38], edx
fild dword [esp + 0x38]
fsub dword [0x423024]
mov eax, dword [esp + 0x34]
mov dword [esp + 0x38], eax
fild dword [esp + 0x38]
faddp st(1)
call fcn.0040b2b0
push 0x31e
mov dword [esp + 0x38], eax
dec dword [0x423ee0]
push 0x423bc0
call fcn.00401b50
add esp, 0x20
mov dword [esp + 0x20], eax
cmp esi, ebx
je 0x4095bc
jmp 0x4090e0
mov ecx, dword [0x4277c0]
push 0
push ecx
call fcn.004016c0
add esp, 8
test eax, eax
jne 0x40910a
mov edx, dword [0x4277c8]
mov eax, dword [0x427304]
push edx
push eax
call fcn.004010c0
add esp, 8
fld qword [0x4239f0]
mov ecx, dword [esp + 0x3c]
fsub qword [0x41f340]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x68]
push ecx
fstp qword [0x4239f0]
push edx
fld qword [0x4239f0]
push eax
fmul dword [esp + 0x3c]
lea ecx, [esp + 0xb0]
push ecx
fstp dword [esp + 0x40]
call fcn.00402a10
push 0x8b
push 0x423f70
call fcn.00401b50
mov ebx, eax
mov eax, dword [esp + 0x50]
add esp, 0x18
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409160
mov edi, ebx
sub eax, esi
dec edi
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x409170
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x2710
push 0
lea edx, [esp + 0x90]
push edx
mov ecx, eax
lea eax, [esp + 0xb0]
and ecx, 3
push ebx
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00408740
xor edx, edx
push 0x8b
xor ecx, ecx
push edx
mov word [esp + 0x30], cx
mov word [esp + 0x30], dx
push ebx
call fcn.0040b8c0
fld qword [0x425198]
push ebx
fmul qword [0x41f470]
fstp qword [0x425198]
call fcn.0040b394
mov eax, dword [0x423f50]
mov dword [esp + 0x38], eax
fild dword [esp + 0x38]
add esp, 0x24
fld qword [esp + 0x7c]
fadd qword [0x41f9d0]
fsub qword [0x41f9c8]
fsubp st(1)
call fcn.0040b2b0
cmp dword [esp + 0xa0], 0x10
mov dword [0x423f50], eax
mov eax, dword [esp + 0x8c]
jae 0x409219
lea eax, [esp + 0x8c]
mov ecx, dword [esp + 0x9c]
mov edx, dword [esp + 0x6c]
push ecx
push eax
push edx
call fcn.00408540
add esp, 0xc
cmp eax, 9
jge 0x409241
mov dword [esp + 0x50], 0x81d9cb09
jmp 0x40958c
mov ecx, dword [esp + 0x8c]
mov edi, 0x10
cmp dword [esp + 0xa0], edi
jae 0x40925d
lea ecx, [esp + 0x8c]
mov edx, dword [ecx]
xor ecx, ecx
cmp ecx, dword [esp + 0x78]
jg 0x409293
jl 0x40926f
cmp edx, dword [esp + 0x74]
jae 0x409293
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x40]
lea edx, [ecx + eax - 0x2ef67c42]
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fstp dword [esp + 0x14]
dec dword [esp + 0x18]
jmp 0x40958c
lea esi, [eax - 1]
cmp esi, dword [esp + 0x9c]
jbe 0x4092a4
call fcn.0040ba97
mov eax, dword [esp + 0x8c]
cmp dword [esp + 0xa0], edi
jae 0x4092bb
lea eax, [esp + 0x8c]
mov byte [eax + esi], 0
mov esi, dword [esp + 0xa0]
mov ebx, dword [esp + 0x8c]
mov eax, ebx
cmp esi, edi
jae 0x4092da
lea eax, [esp + 0x8c]
lea ecx, [esp + 0xa4]
add eax, 8
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x409304
test dl, dl
je 0x409300
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x409304
add eax, 2
add ecx, 2
test dl, dl
jne 0x4092e4
xor eax, eax
jmp 0x409309
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40958c
cmp esi, edi
jb 0x4093fd
mov edi, ebx
test ebx, ebx
je 0x40934c
mov eax, ebx
cmp esi, 0x10
jae 0x40932d
lea eax, [esp + 0x8c]
cmp eax, edi
ja 0x40934c
mov eax, ebx
cmp esi, 0x10
jae 0x40933f
lea eax, [esp + 0x8c]
mov ecx, dword [esp + 0x9c]
add eax, ecx
cmp edi, eax
jbe 0x409358
call fcn.0040ba97
mov ecx, dword [esp + 0x9c]
lea esi, [esp + 0x88]
mov ebx, edi
mov edx, dword [esp + 0xa0]
mov eax, dword [esp + 0x8c]
cmp edx, 0x10
jae 0x40937b
lea eax, [esp + 0x8c]
lea edi, [eax + ecx]
test edi, edi
je 0x4093b2
mov eax, dword [esp + 0x8c]
cmp edx, 0x10
jae 0x409395
lea eax, [esp + 0x8c]
cmp eax, edi
ja 0x4093b2
mov eax, dword [esp + 0x8c]
cmp edx, 0x10
jae 0x4093ac
lea eax, [esp + 0x8c]
add eax, ecx
cmp edi, eax
jbe 0x4093b7
call fcn.0040ba97
cmp esi, 0xfffffffc
je 0x4093d0
test esi, esi
je 0x4093cb
lea eax, [esp + 0x88]
cmp esi, eax
je 0x4093d0
call fcn.0040ba97
cmp ebx, edi
je 0x40946c
mov ecx, 0xfffff52a
mov word [0x423bb4], cx
cmp esi, 0xfffffffc
je 0x40941a
test esi, esi
jne 0x4093f2
call fcn.0040ba97
cmp dword [esi + 0x18], 0x10
jb 0x409409
mov eax, dword [esi + 4]
jmp 0x40940c
lea edi, [esp + 0x8c]
jmp 0x40931f
lea eax, [esi + 4]
mov edx, dword [esi + 0x14]
add edx, eax
cmp ebx, edx
jb 0x40941a
call fcn.0040ba97
mov byte [ebx], 0
cmp esi, 0xfffffffc
je 0x409447
test esi, esi
jne 0x40942b
call fcn.0040ba97
cmp dword [esi + 0x18], 0x10
jb 0x409436
mov eax, dword [esi + 4]
jmp 0x409439
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp ebx, ecx
jb 0x409447
call fcn.0040ba97
mov dx, word [0x4241b0]
mov ecx, dword [0x423f50]
movsx eax, dx
inc ebx
sub eax, ecx
mov ecx, dword [esp + 0x9c]
mov word [0x4241b0], ax
jmp 0x409361
push 0x7e
push 0x423f70
call fcn.00401b50
fld qword [esp + 0x5c]
fsub qword [0x41f9c0]
mov esi, eax
add esp, 8
fsub qword [0x41f9b8]
fcomp qword [0x41f9b0]
fnstsw ax
fld qword [esp + 0x54]
fld1
fadd st(1), st(0)
fxch st(1)
fstp qword [esp + 0x54]
test ah, 0x44
jnp 0x4094cf
inc dword [esp + 0x1c]
fadd qword [esp + 0x5c]
fstp qword [esp + 0x5c]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x34], edx
fild dword [esp + 0x34]
fadd qword [esp + 0x5c]
call fcn.0040b2b0
mov dword [esp + 0x34], eax
jmp 0x4094d1
fstp st(0)
push 0
push 0
lea eax, [esp + 0x90]
push eax
lea ecx, [esp + 0xb0]
push esi
push ecx
call fcn.00408740
xor eax, eax
push 0x7e
xor edx, edx
push eax
mov word [esp + 0x30], dx
mov word [esp + 0x30], ax
push esi
call fcn.0040b8c0
fld qword [0x425198]
fmul qword [0x41f470]
push esi
fstp qword [0x425198]
call fcn.0040b394
push 0xc
push 0x424068
call fcn.00401b50
add esp, 0x2c
mov esi, eax
lea ecx, [eax + 1]
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x409530
sub eax, ecx
push eax
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0x94]
call fcn.00404260
mov edi, eax
xor eax, eax
mov dword [esi], eax
xor ecx, ecx
mov word [esp + 0x14], cx
mov dword [esi + 4], eax
xor edx, edx
mov word [esp + 0x14], dx
mov dword [esi + 8], eax
fld qword [0x425198]
fmul qword [0x41f470]
push esi
fstp qword [0x425198]
call fcn.0040b394
mov eax, dword [esp + 0xa0]
add eax, 0xfffffff5
add esp, 4
cmp edi, eax
je 0x4095a1
mov eax, dword [esp + 0x3c]
inc eax
mov dword [esp + 0x3c], eax
cmp eax, dword [esp + 0x24]
jne 0x4090e0
jmp 0x4095b8
push 0xb
push edi
lea ecx, [esp + 0x90]
call fcn.00405aa0
mov dword [esp + 0x70], 1
mov edi, dword [esp + 0x38]
mov esi, dword [esp + 0x6c]
xor edx, edx
push 0x408
xor ecx, ecx
push edx
mov word [esp + 0x1c], cx
mov word [esp + 0x1c], dx
push esi
call fcn.0040b8c0
fld qword [0x425198]
fmul qword [0x41f470]
push esi
fstp qword [0x425198]
call fcn.0040b394
xor eax, eax
mov dword [edi], eax
mov dword [edi + 4], eax
mov word [esp + 0x24], ax
mov dword [edi + 8], eax
xor ecx, ecx
mov word [esp + 0x24], cx
mov byte [edi + 0xc], al
fld qword [0x425198]
fmul qword [0x41f470]
push edi
fstp qword [0x425198]
call fcn.0040b394
mov esi, dword [esp + 0x34]
xor eax, eax
push 0x31e
xor edx, edx
push eax
mov word [esp + 0x30], dx
mov word [esp + 0x30], ax
push esi
call fcn.0040b8c0
fld qword [0x425198]
fmul qword [0x41f470]
push esi
fstp qword [0x425198]
call fcn.0040b394
mov esi, dword [esp + 0x8c]
xor edx, edx
push 0xaf1
xor ecx, ecx
push edx
mov word [esp + 0x40], cx
mov word [esp + 0x40], dx
push esi
call fcn.0040b8c0
fld qword [0x425198]
fmul qword [0x41f470]
push esi
fstp qword [0x425198]
call fcn.0040b394
push 0x40
lea eax, [esp + 0xdc]
push 0
push eax
call fcn.0040b8c0
add esp, 0x40
cmp dword [esp + 0x70], 0
je 0x4099c0
mov ecx, dword [esp + 0x84]
push 0x708
push ecx
call fcn.00402c70
add esp, 8
cmp dword [esp + 0x9c], 0x200
jbe 0x4099b8
push 0x370
call fcn.0040b471
mov dx, word [0x4240c8]
mov cx, word [0x423a2c]
mov ebx, eax
movsx eax, dx
movsx edx, cx
add edx, eax
add esp, 4
cmp edx, 0x56b9b0a1
jle 0x40972c
fld qword [esp + 0x5c]
fld dword [0x4240d0]
fsub qword [0x41f9a8]
fsubp st(1)
fstp qword [esp + 0x5c]
fld dword [0x4240d0]
fadd qword [0x41f340]
fstp dword [0x4240d0]
push ebx
push 0xeb
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push ebx
call fcn.00403b20
push 3
push 0x4235b0
call fcn.00401b50
mov esi, eax
push esi
push ebx
call fcn.0040bf0e
mov edi, eax
xor eax, eax
mov word [esp + 0x2c], ax
mov word [esi], ax
xor ecx, ecx
mov word [esp + 0x2c], cx
mov byte [esi + 2], al
fld qword [0x425198]
fmul qword [0x41f470]
push esi
fstp qword [0x425198]
call fcn.0040b394
dec dword [esp + 0x34]
fld qword [0x4241c0]
fadd qword [0x41f340]
add esp, 0x1c
fstp qword [0x4241c0]
mov edx, dword [esp + 0x18]
add edx, 0x84b1bc
mov dword [esp + 0x24], edx
fild dword [esp + 0x24]
fld qword [0x4241c0]
fsub qword [0x41f9a0]
fcompp
fnstsw ax
test ah, 0x41
jne 0x4097ed
inc dword [0x42350c]
mov ecx, dword [0x42350c]
mov edx, dword [esp + 0x18]
mov eax, 0x2f54407f
sub eax, ecx
sub eax, edx
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
fstp qword [esp + 0x7c]
cmp dword [esp + 0xa0], 0x10
mov eax, dword [esp + 0x8c]
jae 0x409805
lea eax, [esp + 0x8c]
mov ecx, dword [esp + 0x9c]
push edi
push 1
push ecx
push eax
call fcn.0040bdc8
push edi
call fcn.0040bbea
add esp, 0x14
push 0x104
lea eax, [ebx + 0x104]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x15
push 0x423b24
call fcn.00401b50
push 0x20
push 0x425210
mov edi, eax
call fcn.00401b50
mov edx, dword [esp + 0x60]
mov dword [esp + 0x34], edx
fild dword [esp + 0x34]
mov esi, eax
fld qword [esp + 0x6c]
fsub qword [0x41f998]
fsub qword [0x41f990]
fsubp st(1)
call fcn.0040b2b0
mov dword [esp + 0x60], eax
mov eax, dword [0x4277c0]
push eax
push esi
lea eax, [ebx + 0x104]
push eax
push edi
lea eax, [ebx + 0x208]
push 0x168
push eax
call fcn.0040bf25
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
xor ecx, ecx
mov word [esp + 0x3c], cx
mov dword [esi + 0x18], eax
xor edx, edx
mov word [esp + 0x3c], dx
mov dword [esi + 0x1c], eax
fld qword [0x425198]
fmul qword [0x41f470]
push esi
fstp qword [0x425198]
call fcn.0040b394
xor eax, eax
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
mov word [esp + 0x40], ax
mov dword [edi + 0x10], eax
xor ecx, ecx
mov word [esp + 0x40], cx
mov byte [edi + 0x14], al
fld qword [0x425198]
fmul qword [0x41f470]
push edi
fstp qword [0x425198]
call fcn.0040b394
mov edx, dword [0x4277c0]
push 1
push edx
call fcn.004016c0
lea eax, [ebx + 0x208]
push eax
push ebx
call fcn.004010c0
add esp, 0x40
push 0x370
push 0
push ebx
call fcn.0040b8c0
push ebx
call fcn.0040b394
add esp, 0x10
push 0x15f90
call dword [sym.imp.KERNEL32.dll_Sleep]
fld dword [0x423548]
fsub qword [0x41f988]
fsub qword [esp + 0x7c]
fcomp qword [0x41f980]
fnstsw ax
fld dword [0x423548]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [0x423548]
test ah, 0x41
jne 0x4099b6
dec dword [esp + 0x18]
mov eax, dword [esp + 0x18]
add eax, 0x6cad7d74
cmp eax, 0x92a56e4
jle 0x4099b6
fadd qword [esp + 0x54]
fstp qword [esp + 0x54]
fld qword [esp + 0x54]
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x24], ecx
fild dword [esp + 0x24]
fsubp st(1)
fsub qword [0x41f978]
fstp qword [0x424170]
jmp 0x4099b8
fstp st(0)
mov dword [esp + 0x1c], 0xbdb9f8c7
mov dx, word [0x423a2c]
mov edi, dword [esp + 0x48]
mov ebx, dword [esp + 0x44]
movsx eax, dx
add eax, 0x3fbc4d69
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
fmul dword [esp + 0x30]
fstp dword [esp + 0x30]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [0x4277c0]
push 0
push ecx
call fcn.004016c0
add esp, 8
test eax, eax
jne 0x408fb8
mov edx, dword [0x4277c8]
mov eax, dword [0x427304]
push edx
push eax
call fcn.004010c0
add esp, 8
jmp 0x408fb8