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 0x41e578
mov eax, dword fs:[0]
push eax
sub esp, 0xe0
mov eax, dword [0x4261d8]
xor eax, esp
mov dword [esp + 0xd8], eax
push ebx
push esi
push edi
mov eax, dword [0x4261d8]
xor eax, esp
push eax
lea eax, [esp + 0xf0]
mov dword fs:[0], eax
fldz
xor eax, eax
mov word [esp + 0x40], ax
fst qword [esp + 0x6c]
fst qword [esp + 0x4c]
xor edi, edi
fldz
xor ecx, ecx
fst dword [esp + 0x68]
xor esi, esi
fxch st(1)
xor ebx, ebx
fstp qword [esp + 0x44]
mov dword [esp + 0x5c], esi
mov dword [esp + 0x60], ebx
mov dword [esp + 0x38], edi
mov dword [esp + 0x74], edi
fstp dword [esp + 0x2c]
mov word [esp + 0x64], cx
mov dword [esp + 0x78], edi
mov dx, word [0x4254c8]
movsx eax, dx
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fld dword [str._TR_b_]
mov cx, word [str.X_kq]
mov eax, dword [esp + 0x74]
movsx edx, cx
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
mov dword [esp + 0x10], eax
fsubp st(1)
fiadd dword [esp + 0x10]
fsubp st(1)
call fcn.0040b310
mov word [0x4254c8], ax
dec word [str.X_kq]
fld dword [str._TR_b_]
fsub qword [0x41f388]
mov dword [esp + 0xa0], 0xf
mov dword [esp + 0x9c], edi
mov byte [esp + 0x8c], bl
fstp dword [str._TR_b_]
push 0x118
mov dword [esp + 0xfc], edi
call fcn.0040b22c
push eax
mov dword [esp + 0x70], eax
call fcn.004039c0
add esp, 8
push edi
call fcn.0040b07a
fld qword [esp + 0x48]
fld1
mov edi, eax
fadd st(1), st(0)
add esp, 4
fxch st(1)
mov dword [esp + 0x7c], edi
mov dword [esp + 0x80], edx
fstp qword [esp + 0x44]
mov ecx, dword [0x425494]
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
fadd qword [esp + 0x44]
mov eax, dword [esp + 0x78]
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fsubp st(1)
fld qword [esp + 0x44]
fsubr qword [0x41f9d8]
fucompp
fnstsw ax
test ah, 0x44
jnp 0x4090cd
fld dword [0x425b18]
mov cx, word [0x424440]
movsx eax, cx
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
faddp st(1)
fcomp qword [0x41f9d0]
fnstsw ax
test ah, 0x44
jp 0x4090cd
fld dword [esp + 0x2c]
fsub qword [0x41f9c8]
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fadd st(1)
fstp dword [esp + 0x2c]
cmp edx, ebx
jg 0x4090e3
jl 0x4090d7
cmp edi, esi
jae 0x4090e3
xor esi, esi
xor ebx, ebx
mov dword [esp + 0x5c], esi
mov dword [esp + 0x60], ebx
mov eax, edi
sub eax, esi
mov ecx, edx
sbb ecx, ebx
mov dword [esp + 0x20], ecx
js 0x409aa4
jg 0x409102
cmp eax, 0x708
jbe 0x409aa4
mov eax, dword [esp + 0x74]
add eax, 0xf2f1f29
cmp eax, 0x286c279c
jge 0x409149
fld qword [esp + 0x4c]
fsub qword [0x41f9c0]
fsub qword [esp + 0x6c]
fcomp qword [0x41f9b8]
fnstsw ax
fld qword [esp + 0x6c]
fsub st(1)
fstp qword [esp + 0x6c]
test ah, 1
jne 0x409149
fld qword [0x423190]
fadd qword [0x41f9b0]
fstp qword [0x423190]
fld dword [0x4231c0]
movzx ecx, word [0x4253e4]
fsubr qword [0x41f9a8]
mov dword [esp + 0x60], edx
movsx edx, cx
mov dword [esp + 0x28], edx
or esi, 0xffffffff
mov dword [esp + 0x5c], edi
fild dword [esp + 0x28]
mov dword [esp + 0x10], 0
faddp st(1)
fmul qword [0x425428]
fstp qword [0x425428]
add word [0x4253e4], si
mov eax, dword [0x4254ac]
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
fld qword [0x425498]
fsubr qword [0x41f9a0]
fsubp st(1)
call fcn.0040b310
mov dword [0x4254ac], eax
movzx ecx, word [esp + 0x40]
movsx edx, cx
mov dword [esp + 0x28], edx
shr edi, 9
lea ebx, [edi + 0x55]
fild dword [esp + 0x28]
mov dword [esp + 0x58], edi
mov dword [esp + 0x1c], ebx
fadd qword [0x425538]
mov eax, dword [esp + 0x38]
add dword [esp + 0x40], esi
sub eax, 0x4d990a1b
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
fucompp
fnstsw ax
fadd qword [0x425538]
fstp qword [0x425538]
test ah, 0x44
jnp 0x40920e
fld dword [esp + 0x2c]
fadd qword [esp + 0x6c]
fstp qword [esp + 0x6c]
push 0x408
push 0x425be0
call fcn.00401c10
push 0xd
push 0x4244a0
mov dword [esp + 0x40], eax
call fcn.00401c10
mov esi, eax
push 0xaf1
push 0x423500
mov dword [esp + 0x6c], esi
call fcn.00401c10
push 0x31e
push 0x4240c8
mov dword [esp + 0x48], eax
call fcn.00401c10
add esp, 0x20
mov dword [esp + 0x3c], eax
cmp edi, ebx
je 0x40972f
mov ecx, dword [0x4279e0]
push 0
push ecx
call fcn.00401180
add esp, 8
test eax, eax
jne 0x40928e
mov edx, dword [0x4279e8]
mov eax, dword [0x427524]
push edx
push eax
call fcn.004010c0
add esp, 8
fld qword [0x425260]
fadd qword [esp + 0x4c]
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x14], ecx
fsub qword [0x41f998]
fild dword [esp + 0x14]
fmulp st(1)
call fcn.0040b310
mov edx, dword [esp + 0x58]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x38], eax
fld qword [esp + 0x4c]
mov eax, dword [esp + 0x3c]
fsub qword [0x41f388]
push edx
push eax
push ecx
fstp qword [esp + 0x58]
lea edx, [esp + 0xb0]
push edx
call fcn.004034f0
push 0x8b
push 0x425278
call fcn.00401c10
mov ebx, eax
mov eax, dword [esp + 0x6c]
add esp, 0x18
mov esi, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409300
mov edi, ebx
sub eax, esi
dec edi
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x409310
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 + 0x90]
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xb0]
push ebx
push ecx
call fcn.004085c0
push 0x8b
fldz
push 0
fstp dword [esp + 0x50]
mov dword [esp + 0x30], 0
push ebx
call fcn.0040b400
push ebx
call fcn.0040b14f
mov edx, dword [esp + 0x38]
mov dword [esp + 0x38], edx
fild dword [esp + 0x38]
add esp, 0x24
fsub dword [esp + 0x34]
call fcn.0040b310
mov dword [esp + 0x14], eax
fld qword [esp + 0x44]
cmp dword [esp + 0xa0], 0x10
fstp qword [esp + 0x44]
mov eax, dword [esp + 0x8c]
jae 0x4093a0
lea eax, [esp + 0x8c]
mov ecx, dword [esp + 0x9c]
mov edx, dword [esp + 0x30]
push ecx
push eax
push edx
call fcn.004082f0
fld dword [0x425b2c]
fadd dword [0x425254]
add esp, 0xc
cmp eax, 9
fstp dword [0x425254]
fld dword [0x425b2c]
fadd qword [0x41f388]
fstp dword [0x425b2c]
jge 0x4093f6
fld qword [0x4234d8]
fsub qword [0x41f990]
fstp qword [0x4234d8]
jmp 0x4096f1
mov ecx, dword [esp + 0x8c]
mov edi, 0x10
cmp dword [esp + 0xa0], edi
jae 0x409412
lea ecx, [esp + 0x8c]
mov edx, dword [ecx]
xor ecx, ecx
cmp ecx, dword [esp + 0x80]
jl 0x4096f1
jg 0x40942f
cmp edx, dword [esp + 0x7c]
jb 0x4096f1
lea esi, [eax - 1]
cmp esi, dword [esp + 0x9c]
jbe 0x409440
call fcn.0040c0bd
mov eax, dword [esp + 0x8c]
cmp dword [esp + 0xa0], edi
jae 0x409457
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 0x409476
lea eax, [esp + 0x8c]
lea ecx, [esp + 0xa4]
add eax, 8
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4094a0
test dl, dl
je 0x40949c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4094a0
add eax, 2
add ecx, 2
test dl, dl
jne 0x409480
xor eax, eax
jmp 0x4094a5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4096f1
cmp esi, edi
jb 0x40958d
mov edi, ebx
test ebx, ebx
je 0x4094e8
mov eax, ebx
cmp esi, 0x10
jae 0x4094c9
lea eax, [esp + 0x8c]
cmp eax, edi
ja 0x4094e8
mov eax, ebx
cmp esi, 0x10
jae 0x4094db
lea eax, [esp + 0x8c]
mov ecx, dword [esp + 0x9c]
add eax, ecx
cmp edi, eax
jbe 0x4094f4
call fcn.0040c0bd
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 0x409517
lea eax, [esp + 0x8c]
lea edi, [eax + ecx]
test edi, edi
je 0x40954e
mov eax, dword [esp + 0x8c]
cmp edx, 0x10
jae 0x409531
lea eax, [esp + 0x8c]
cmp eax, edi
ja 0x40954e
mov eax, dword [esp + 0x8c]
cmp edx, 0x10
jae 0x409548
lea eax, [esp + 0x8c]
add eax, ecx
cmp edi, eax
jbe 0x409553
call fcn.0040c0bd
cmp esi, 0xfffffffc
je 0x40956c
test esi, esi
je 0x409567
lea eax, [esp + 0x88]
cmp esi, eax
je 0x40956c
call fcn.0040c0bd
cmp ebx, edi
je 0x409616
cmp esi, 0xfffffffc
je 0x4095aa
test esi, esi
jne 0x409582
call fcn.0040c0bd
cmp dword [esi + 0x18], 0x10
jb 0x409599
mov eax, dword [esi + 4]
jmp 0x40959c
lea edi, [esp + 0x8c]
jmp 0x4094bb
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp ebx, ecx
jb 0x4095aa
call fcn.0040c0bd
fld dword [esp + 0x2c]
mov byte [ebx], 0
fsub qword [0x41f988]
fstp dword [esp + 0x2c]
cmp esi, 0xfffffffc
je 0x4095e5
test esi, esi
jne 0x4095c9
call fcn.0040c0bd
cmp dword [esi + 0x18], 0x10
jb 0x4095d4
mov eax, dword [esi + 4]
jmp 0x4095d7
lea eax, [esi + 4]
mov edx, dword [esi + 0x14]
add edx, eax
cmp ebx, edx
jb 0x4095e5
call fcn.0040c0bd
mov ax, word [0x423168]
movsx ecx, ax
mov dword [esp + 0x34], ecx
inc ebx
fild dword [esp + 0x34]
fadd dword [0x425254]
fstp dword [0x425254]
inc word [0x423168]
mov ecx, dword [esp + 0x9c]
jmp 0x4094fd
push 0x7e
push 0x425278
call fcn.00401c10
xor ebx, ebx
push ebx
push ebx
lea edx, [esp + 0x98]
mov esi, eax
push edx
lea eax, [esp + 0xb8]
push esi
push eax
call fcn.004085c0
fldz
push 0x7e
fstp dword [esp + 0x4c]
push ebx
mov dword [esp + 0x38], ebx
push esi
call fcn.0040b400
push esi
call fcn.0040b14f
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x60], ecx
fild dword [esp + 0x60]
fsub dword [esp + 0x58]
call fcn.0040b310
mov dword [esp + 0x40], eax
fld qword [esp + 0x70]
fsub qword [0x41f980]
push 0xc
push 0x425350
fstp dword [esp + 0x60]
call fcn.00401c10
add esp, 0x34
mov esi, eax
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x409692
sub eax, ecx
push eax
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0x94]
call fcn.00404a40
fldz
mov edi, eax
fstp dword [esp + 0x18]
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esp + 0x14], ebx
push esi
mov dword [esi + 8], eax
call fcn.0040b14f
mov edx, dword [esp + 0x18]
mov dword [esp + 0x38], edx
fild dword [esp + 0x38]
add esp, 4
fsub dword [esp + 0x18]
call fcn.0040b310
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x9c]
add eax, 0xfffffff5
cmp edi, eax
je 0x409706
mov eax, dword [esp + 0x58]
inc eax
mov dword [esp + 0x58], eax
cmp eax, dword [esp + 0x1c]
jne 0x409264
jmp 0x40972b
push 0xb
push edi
lea ecx, [esp + 0x90]
call fcn.00405fd0
fld qword [esp + 0x44]
fsub qword [0x41f978]
mov dword [esp + 0x10], 1
fstp qword [esp + 0x44]
mov esi, dword [esp + 0x54]
fldz
mov ebx, dword [esp + 0x30]
xor edi, edi
fstp dword [esp + 0x18]
push 0x408
push edi
mov dword [esp + 0x1c], edi
push ebx
call fcn.0040b400
push ebx
call fcn.0040b14f
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x2c], ecx
fild dword [esp + 0x2c]
fsub dword [esp + 0x28]
call fcn.0040b310
fldz
mov dword [esp + 0x24], eax
fstp dword [esp + 0x28]
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esp + 0x40], edi
push esi
mov byte [esi + 0xc], al
call fcn.0040b14f
mov edx, dword [esp + 0x44]
mov dword [esp + 0x30], edx
fild dword [esp + 0x30]
fsub dword [esp + 0x2c]
call fcn.0040b310
fldz
mov esi, dword [esp + 0x50]
push 0x31e
mov dword [esp + 0x48], eax
fstp dword [esp + 0x30]
push edi
mov dword [esp + 0x4c], edi
push esi
call fcn.0040b400
push esi
call fcn.0040b14f
mov eax, dword [esp + 0x54]
mov dword [esp + 0x40], eax
fild dword [esp + 0x40]
fsub dword [esp + 0x3c]
call fcn.0040b310
fldz
mov esi, dword [esp + 0x4c]
push 0xaf1
mov dword [esp + 0x58], eax
fstp dword [esp + 0x40]
push edi
mov dword [esp + 0x68], edi
push esi
call fcn.0040b400
push esi
call fcn.0040b14f
mov ecx, dword [esp + 0x70]
mov dword [esp + 0x50], ecx
fild dword [esp + 0x50]
fsub dword [esp + 0x4c]
call fcn.0040b310
push 0x40
lea edx, [esp + 0xdc]
push edi
push edx
mov dword [esp + 0x7c], eax
call fcn.0040b400
add esp, 0x40
cmp dword [esp + 0x10], edi
je 0x409aa6
mov eax, dword [esp + 0x68]
push 0x708
push eax
call fcn.00402340
mov eax, dword [str._bo]
mov ecx, dword [esp + 0x40]
add eax, 0x48de60b7
imul ecx, eax
add esp, 8
cmp dword [esp + 0x9c], 0x200
mov dword [esp + 0x38], ecx
jbe 0x409aa6
push 0x370
call fcn.0040b22c
add esp, 4
mov ebx, eax
push ebx
push 0xeb
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push ebx
call fcn.00403890
push 3
push 0x425b88
call fcn.00401c10
fld dword [0x41f970]
mov esi, eax
fstp dword [0x426024]
push esi
push ebx
call fcn.0040bb80
fldz
mov edi, eax
fstp dword [esp + 0x30]
xor eax, eax
mov word [esi], ax
mov dword [esp + 0x28], eax
push esi
mov byte [esi + 2], al
call fcn.0040b14f
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x38], edx
fild dword [esp + 0x38]
add esp, 0x1c
fsub dword [esp + 0x18]
call fcn.0040b310
cmp dword [esp + 0xa0], 0x10
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x8c]
jae 0x4098fe
lea eax, [esp + 0x8c]
mov ecx, dword [esp + 0x9c]
push edi
push 1
push ecx
push eax
call fcn.0040ba3a
push edi
call fcn.0040b85c
add esp, 0x14
push 0x104
lea eax, [ebx + 0x104]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov edx, dword [0x425324]
mov dword [esp + 0x1c], edx
fild dword [esp + 0x1c]
fadd qword [esp + 0x4c]
movzx eax, word [0x425b28]
movsx ecx, ax
mov dword [esp + 0x1c], ecx
fild dword [esp + 0x1c]
faddp st(1)
call fcn.0040b310
mov word [0x425b28], ax
fld qword [esp + 0x4c]
fadd qword [0x41f388]
push 0x15
push 0x425b98
fstp qword [esp + 0x54]
call fcn.00401c10
push 0x20
push 0x424480
mov edi, eax
call fcn.00401c10
mov edx, dword [0x4279e0]
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.0040bb97
fldz
mov eax, dword [esp + 0x60]
mov dword [0x425b94], eax
fstp dword [esp + 0x40]
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 [esi + 0x18], eax
mov dword [esp + 0x38], eax
push esi
mov dword [esi + 0x1c], eax
call fcn.0040b14f
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x48], ecx
fild dword [esp + 0x48]
fsub dword [esp + 0x44]
call fcn.0040b310
fldz
mov dword [esp + 0x3c], eax
fstp dword [esp + 0x44]
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 + 0x3c], 0
push edi
mov byte [edi + 0x14], al
call fcn.0040b14f
mov edx, dword [esp + 0x40]
mov dword [esp + 0x4c], edx
fild dword [esp + 0x4c]
fsub dword [esp + 0x48]
call fcn.0040b310
mov dword [esp + 0x40], eax
movzx eax, word [esp + 0x94]
mov dx, word [esp + 0x70]
movsx ecx, ax
movsx eax, dx
add ecx, eax
mov dword [esp + 0x4c], ecx
push 1
fild dword [esp + 0x50]
fsub qword [esp + 0x80]
fmul qword [0x425ad8]
mov ecx, dword [0x4279e0]
push ecx
fstp qword [0x425ad8]
call fcn.00401180
lea eax, [ebx + 0x208]
push eax
push ebx
call fcn.004010c0
add esp, 0x40
push 0x370
push 0
push ebx
call fcn.0040b400
push ebx
call fcn.0040b14f
add esp, 0x10
push 0x15f90
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x409aa6
fstp st(0)
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
add dword [0x425a48], 0x40ab7eac
mov edx, dword [0x4279e0]
push 0
push edx
call fcn.00401180
add esp, 8
test eax, eax
jne 0x409ae5
mov eax, dword [0x4279e8]
mov ecx, dword [0x427524]
push eax
push ecx
call fcn.004010c0
add esp, 8
fld qword [0x4253b8]
mov ebx, dword [esp + 0x60]
fsubr qword [0x41f968]
mov esi, dword [esp + 0x5c]
xor edi, edi
fmul dword [0x425a14]
fstp dword [0x425a14]
fld qword [0x4253b8]
fsub qword [0x41f388]
fstp qword [0x4253b8]
jmp 0x409037