Function at 0x409060
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 0x41e988
mov eax, dword fs:[0]
push eax
sub esp, 0xe8
mov eax, dword [0x426120]
xor eax, esp
mov dword [esp + 0xe0], eax
push ebx
push esi
push edi
mov eax, dword [0x426120]
xor eax, esp
push eax
lea eax, [esp + 0xf8]
mov dword fs:[0], eax
fldz
xor eax, eax
fst qword [esp + 0x5c]
xor ecx, ecx
fldz
mov dword [esp + 0x30], eax
fst dword [esp + 0x28]
mov dword [esp + 0x4c], eax
fxch st(1)
mov dword [esp + 0x50], eax
fst qword [esp + 0x7c]
fst qword [esp + 0x84]
fstp qword [esp + 0x3c]
fstp dword [esp + 0x34]
mov word [esp + 0x38], cx
mov dword [esp + 0x24], eax
mov dword [esp + 0x48], eax
fld qword [esp + 0x3c]
mov dx, word [0x425600]
movsx ecx, dx
sub ecx, 0x6ad16bcf
mov dword [esp + 0x2c], ecx
mov dword [esp + 0xa8], 0xf
mov dword [esp + 0xa4], eax
fild dword [esp + 0x2c]
mov byte [esp + 0x94], al
fsubp st(1)
fstp qword [esp + 0x3c]
push 0x118
mov dword [esp + 0x104], eax
call fcn.0040b6aa
push eax
mov dword [esp + 0x78], eax
call fcn.00402cb0
add esp, 8
push 0
call fcn.0040b49a
mov ecx, dword [esp + 0x54]
add esp, 4
cmp edx, ecx
mov edi, eax
mov dword [esp + 0x74], edi
mov dword [esp + 0x78], edx
jg 0x409169
jl 0x40915b
cmp edi, dword [esp + 0x4c]
jae 0x409169
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 [0x4255c4], 0x139895b6
mov dword [esp + 0x18], esi
js 0x409d65
jg 0x409194
cmp eax, 0x708
jbe 0x409d65
fld qword [0x424708]
mov dword [esp + 0x50], edx
fld1
mov dword [esp + 0x4c], edi
fsub st(1), st(0)
fxch st(1)
fstp qword [0x424708]
fld qword [0x424708]
mov edx, dword [esp + 0x24]
fsubr qword [0x41f988]
mov dword [esp + 0x2c], edx
fild dword [esp + 0x2c]
faddp st(1)
call fcn.0040b5b0
mov dword [esp + 0x24], eax
fld qword [0x424768]
fmul qword [0x41f980]
shr edi, 9
lea ebx, [edi + 0x55]
mov dword [esp + 0x2c], 0
fstp qword [0x424768]
mov ax, word [0x425660]
movsx ecx, ax
mov eax, 0xf6692807
sub eax, ecx
add dword [esp + 0x24], eax
mov dword [esp + 0x54], edi
fld dword [esp + 0x28]
mov dword [esp + 0x14], ebx
fadd qword [0x423868]
fsub dword [0x423620]
fld dword [0x42564c]
fsub qword [0x41f978]
fadd dword [0x425414]
fcompp
fnstsw ax
fld dword [0x425414]
fsub st(1)
fstp dword [0x425414]
fld dword [0x423620]
fadd st(1)
fstp dword [0x423620]
fsubr dword [esp + 0x28]
fstp dword [esp + 0x28]
test ah, 0x41
jp 0x40927d
dec word [0x424740]
mov dx, word [0x424740]
movsx eax, dx
mov dword [esp + 0x44], eax
fild dword [esp + 0x44]
fadd dword [esp + 0x34]
fstp dword [esp + 0x34]
push 0x408
push 0x423210
call fcn.004014e0
push 0xd
push 0x426000
mov dword [esp + 0x78], eax
call fcn.004014e0
mov esi, eax
push 0xaf1
push 0x423ac8
mov dword [esp + 0x70], esi
call fcn.004014e0
push 0x31e
push 0x425c58
mov dword [esp + 0x64], eax
call fcn.004014e0
add esp, 0x20
mov dword [esp + 0x6c], eax
cmp edi, ebx
je 0x4098c8
mov ecx, dword [0x427920]
push 0
push ecx
call fcn.00402610
add esp, 8
test eax, eax
jne 0x4093a4
fld qword [0x425fc0]
fld1
fadd st(1), st(0)
fxch st(1)
fstp qword [0x425fc0]
fld dword [esp + 0x28]
fld qword [0x425fc0]
fadd qword [0x41f970]
fcompp
fnstsw ax
fld dword [esp + 0x28]
fsub st(1)
fstp dword [esp + 0x28]
test ah, 0x41
jp 0x40938d
mov edx, dword [esp + 0x24]
add edx, 0x791ba8c1
cmp edx, 0xdbf4d58d
je 0x409351
fld qword [esp + 0x7c]
fld qword [esp + 0x3c]
fsub qword [0x41f968]
fsubp st(1)
fstp qword [esp + 0x7c]
fsubr qword [esp + 0x3c]
fstp qword [esp + 0x3c]
jmp 0x40938f
fld qword [esp + 0x5c]
fadd st(1)
fstp qword [esp + 0x5c]
fld qword [0x4246f0]
fadd st(1)
fstp qword [0x4246f0]
fld qword [0x425740]
fstp st(0)
fld qword [0x4246f0]
fstp st(0)
fld qword [esp + 0x5c]
fstp st(0)
fsubr qword [0x425740]
fstp qword [0x425740]
jmp 0x40938f
fstp st(0)
mov eax, dword [0x427928]
mov ecx, dword [0x427464]
push eax
push ecx
call fcn.00401370
add esp, 8
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x44]
push edx
push eax
push ecx
lea edx, [esp + 0xb8]
push edx
call fcn.00403cc0
push 0x8b
push 0x4256a8
call fcn.004014e0
mov ebx, eax
mov eax, dword [esp + 0x70]
add esp, 0x18
mov esi, eax
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4093e0
mov edi, ebx
sub eax, esi
dec edi
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4093f0
fld qword [esp + 0x84]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x20], eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
fild dword [esp + 0x20]
fsubp st(1)
fadd qword [0x41f960]
call fcn.0040b5b0
push 0x2710
push 0
lea ecx, [esp + 0x98]
push ecx
lea edx, [esp + 0xb8]
push ebx
mov word [0x4247a4], ax
inc dword [esp + 0x40]
push edx
call fcn.00408810
fldz
push 0x8b
push 0
fst dword [esp + 0x3c]
fstp dword [esp + 0x3c]
push ebx
call fcn.0040baf0
push ebx
call fcn.0040bb6a
mov ax, word [0x425474]
movzx ecx, word [0x42473c]
cwde
imul ecx, eax
mov word [0x42473c], cx
add esp, 0x24
fld qword [esp + 0x3c]
cmp dword [esp + 0xa8], 0x10
fsub qword [0x41f958]
mov eax, dword [esp + 0x94]
fstp qword [esp + 0x3c]
jae 0x4094ab
lea eax, [esp + 0x94]
mov edx, dword [esp + 0xa4]
push edx
push eax
mov eax, dword [esp + 0x70]
push eax
call fcn.00408420
add esp, 0xc
cmp eax, 9
jl 0x409898
mov ecx, dword [esp + 0x94]
mov edi, 0x10
cmp dword [esp + 0xa8], edi
jae 0x4094e6
lea ecx, [esp + 0x94]
mov edx, dword [ecx]
xor ecx, ecx
cmp ecx, dword [esp + 0x78]
jl 0x409898
jg 0x409500
cmp edx, dword [esp + 0x74]
jb 0x409898
lea esi, [eax - 1]
cmp esi, dword [esp + 0xa4]
jbe 0x409511
call fcn.0040bd64
mov eax, dword [esp + 0x94]
cmp dword [esp + 0xa8], edi
jae 0x409528
lea eax, [esp + 0x94]
fld qword [esp + 0x3c]
mov byte [eax + esi], 0
fsub qword [0x424708]
fadd dword [0x4238dc]
fcomp qword [0x41f950]
fnstsw ax
fld dword [0x4238dc]
fld1
fadd st(1), st(0)
fxch st(1)
fstp dword [0x4238dc]
fld qword [0x424708]
fadd st(1)
fstp qword [0x424708]
test ah, 5
jp 0x40959e
mov cx, word [0x423a24]
mov dx, word [esp + 0x38]
movsx eax, cx
movsx ecx, dx
lea edx, [ecx + eax + 0x66a44303]
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
fstp qword [esp + 0x84]
dec dword [esp + 0x38]
inc word [0x423a24]
jmp 0x4095b8
mov eax, dword [0x42573c]
add eax, 0x526c48f7
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
fmul dword [esp + 0x28]
fstp dword [esp + 0x28]
mov ebx, dword [esp + 0xa8]
mov esi, dword [esp + 0x94]
mov eax, esi
cmp ebx, edi
jae 0x4095d3
lea eax, [esp + 0x94]
lea ecx, [esp + 0xac]
add eax, 8
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4095fd
test dl, dl
je 0x4095f9
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4095fd
add eax, 2
add ecx, 2
test dl, dl
jne 0x4095dd
xor eax, eax
jmp 0x409602
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40961d
fsubr dword [esp + 0x34]
fstp dword [esp + 0x34]
fld dword [esp + 0x34]
fstp qword [0x425640]
jmp 0x409898
fstp st(0)
cmp ebx, edi
jb 0x4096fb
mov edi, esi
test esi, esi
je 0x40965a
mov eax, esi
cmp ebx, 0x10
jae 0x40963b
lea eax, [esp + 0x94]
cmp eax, edi
ja 0x40965a
mov eax, esi
cmp ebx, 0x10
jae 0x40964d
lea eax, [esp + 0x94]
mov ecx, dword [esp + 0xa4]
add eax, ecx
cmp edi, eax
jbe 0x409666
call fcn.0040bd64
mov ecx, dword [esp + 0xa4]
lea esi, [esp + 0x90]
mov ebx, edi
mov edx, dword [esp + 0xa8]
mov eax, dword [esp + 0x94]
cmp edx, 0x10
jae 0x409689
lea eax, [esp + 0x94]
lea edi, [eax + ecx]
test edi, edi
je 0x4096c0
mov eax, dword [esp + 0x94]
cmp edx, 0x10
jae 0x4096a3
lea eax, [esp + 0x94]
cmp eax, edi
ja 0x4096c0
mov eax, dword [esp + 0x94]
cmp edx, 0x10
jae 0x4096ba
lea eax, [esp + 0x94]
add eax, ecx
cmp edi, eax
jbe 0x4096c5
call fcn.0040bd64
cmp esi, 0xfffffffc
je 0x4096de
test esi, esi
je 0x4096d9
lea ecx, [esp + 0x90]
cmp esi, ecx
je 0x4096de
call fcn.0040bd64
cmp ebx, edi
je 0x409752
cmp esi, 0xfffffffc
je 0x409718
test esi, esi
jne 0x4096f0
call fcn.0040bd64
cmp dword [esi + 0x18], 0x10
jb 0x409707
mov eax, dword [esi + 4]
jmp 0x40970a
lea edi, [esp + 0x94]
jmp 0x40962d
lea eax, [esi + 4]
mov edx, dword [esi + 0x14]
add edx, eax
cmp ebx, edx
jb 0x409718
call fcn.0040bd64
mov byte [ebx], 0
cmp esi, 0xfffffffc
je 0x409745
test esi, esi
jne 0x409729
call fcn.0040bd64
cmp dword [esi + 0x18], 0x10
jb 0x409734
mov eax, dword [esi + 4]
jmp 0x409737
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp ebx, ecx
jb 0x409745
call fcn.0040bd64
mov ecx, dword [esp + 0xa4]
inc ebx
jmp 0x40966f
fld qword [esp + 0x5c]
fsub qword [0x41f948]
fcomp qword [0x41f940]
fnstsw ax
fld qword [esp + 0x5c]
fadd qword [0x41f390]
fstp qword [esp + 0x5c]
test ah, 5
jp 0x409789
fld dword [0x42561c]
fsub qword [0x41f938]
fstp dword [0x42561c]
push 0x7e
push 0x4256a8
call fcn.004014e0
fld dword [0x425414]
fadd qword [esp + 0x44]
push 0
push 0
lea edx, [esp + 0xa0]
fmul dword [esp + 0x38]
mov esi, eax
push edx
lea eax, [esp + 0xc0]
push esi
fstp dword [esp + 0x40]
push eax
call fcn.00408810
fldz
push 0x7e
fst dword [esp + 0x40]
push 0
fstp dword [esp + 0x44]
push esi
call fcn.0040baf0
push esi
call fcn.0040bb6a
mov cx, word [0x425474]
movzx edx, word [0x42473c]
movsx eax, cx
imul edx, eax
mov word [0x42473c], dx
fld dword [0x42564c]
fsubr qword [0x41f930]
call fcn.0040b5b0
push 0xc
mov dword [0x4255e8], eax
push 0x423a04
call fcn.004014e0
mov esi, eax
movzx eax, word [0x425f84]
add esp, 0x34
imul eax, eax, 0x58cf9484
mov word [0x425f84], ax
mov eax, esi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x409837
sub eax, ecx
push eax
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0x9c]
call fcn.00404f30
fldz
mov edi, eax
fst dword [esp + 0x20]
xor eax, eax
fstp dword [esp + 0x20]
mov dword [esi], eax
mov dword [esi + 4], eax
push esi
mov dword [esi + 8], eax
call fcn.0040bb6a
mov cx, word [0x425474]
movzx edx, word [0x42473c]
movsx eax, cx
imul edx, eax
mov eax, dword [esp + 0xa8]
add eax, 0xfffffff5
add esp, 4
mov word [0x42473c], dx
cmp edi, eax
je 0x4098ad
mov eax, dword [esp + 0x54]
inc eax
mov dword [esp + 0x54], eax
cmp eax, dword [esp + 0x14]
jne 0x4092d3
jmp 0x4098c4
push 0xb
push edi
lea ecx, [esp + 0x98]
call fcn.00405fa0
mov dword [esp + 0x2c], 1
mov esi, dword [esp + 0x58]
fld qword [0x423888]
movzx ecx, word [esp + 0x38]
fadd qword [0x41f928]
movsx edx, cx
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fld qword [0x424718]
faddp st(2)
fsubrp st(1)
call fcn.0040b5b0
mov edi, dword [esp + 0x68]
mov word [esp + 0x38], ax
fld qword [0x424718]
fadd qword [0x41f390]
push 0x408
push 0
push edi
fstp qword [0x424718]
fldz
fst dword [esp + 0x20]
fstp dword [esp + 0x20]
call fcn.0040baf0
push edi
call fcn.0040bb6a
fldz
movzx eax, word [0x425474]
movzx ecx, word [0x42473c]
cwde
imul ecx, eax
mov word [0x42473c], cx
xor eax, eax
mov dword [esi], eax
fst dword [esp + 0x24]
mov dword [esi + 4], eax
fstp dword [esp + 0x24]
mov dword [esi + 8], eax
push esi
mov byte [esi + 0xc], al
call fcn.0040bb6a
movzx edx, word [0x425474]
fldz
movzx ecx, word [0x42473c]
mov esi, dword [esp + 0x80]
movsx eax, dx
imul ecx, eax
push 0x31e
mov word [0x42473c], cx
push 0
fst dword [esp + 0x30]
push esi
fstp dword [esp + 0x34]
call fcn.0040baf0
push esi
call fcn.0040bb6a
movzx edx, word [0x425474]
fldz
movzx ecx, word [0x42473c]
movsx eax, dx
mov esi, dword [esp + 0x68]
imul ecx, eax
mov word [0x42473c], cx
mov edx, dword [esp + 0x48]
movzx eax, word [0x4247dc]
add edx, 0x2cf09f99
imul edx, eax
push 0xaf1
mov word [0x4247dc], dx
push 0
fst dword [esp + 0x40]
push esi
fstp dword [esp + 0x44]
call fcn.0040baf0
push esi
call fcn.0040bb6a
movzx ecx, word [0x425474]
movzx edx, word [0x42473c]
movsx eax, cx
imul edx, eax
push 0x40
mov word [0x42473c], dx
push 0
lea eax, [esp + 0xe8]
push eax
call fcn.0040baf0
add esp, 0x40
cmp dword [esp + 0x2c], 0
je 0x409d65
mov ecx, dword [esp + 0x70]
push 0x708
push ecx
call fcn.00403a00
add esp, 8
cmp dword [esp + 0xa4], 0x200
jbe 0x409d65
mov edx, dword [esp + 0x48]
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
push 0x370
fadd dword [0x425620]
fstp dword [0x425620]
call fcn.0040b6aa
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.00403b30
fld dword [0x425774]
fsubr qword [0x41f920]
push 3
push 0x425fe8
fmul qword [0x425628]
fstp qword [0x425628]
fld dword [0x425774]
fadd qword [0x41f390]
fstp dword [0x425774]
call fcn.004014e0
add dword [0x425f80], 0x40926915
mov esi, eax
push esi
push ebx
call fcn.0040c311
fldz
mov edi, eax
fst dword [esp + 0x2c]
xor eax, eax
fstp dword [esp + 0x2c]
mov word [esi], ax
push esi
mov byte [esi + 2], al
call fcn.0040bb6a
mov ax, word [0x425474]
movzx ecx, word [0x42473c]
cwde
imul ecx, eax
mov eax, dword [esp + 0xb0]
add esp, 0x1c
cmp dword [esp + 0xa8], 0x10
mov word [0x42473c], cx
jae 0x409b2a
lea eax, [esp + 0x94]
mov edx, dword [esp + 0xa4]
push edi
push 1
push edx
push eax
call fcn.0040c539
push edi
call fcn.0040beb7
fld qword [0x4246c0]
fld1
add esp, 0x14
fadd st(1), st(0)
fxch st(1)
fstp qword [0x4246c0]
fadd dword [0x42390c]
fstp dword [0x42390c]
fld qword [0x4246c0]
fld dword [0x42390c]
mov eax, dword [esp + 0x24]
fsub qword [0x41f918]
mov dword [esp + 0x14], eax
fiadd dword [esp + 0x14]
fcompp
fnstsw ax
test ah, 0x41
jp 0x409ba1
inc dword [esp + 0x48]
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
fadd qword [esp + 0x3c]
fstp qword [esp + 0x3c]
push 0x104
lea eax, [ebx + 0x104]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
add dword [0x423880], 0xfd66a60f
push 0x15
push 0x4247fc
call fcn.004014e0
push 0x20
push 0x42393c
mov edi, eax
call fcn.004014e0
mov edx, dword [0x4254a8]
mov dword [esp + 0x24], edx
fild dword [esp + 0x24]
mov esi, eax
fld dword [esp + 0x44]
fsub qword [0x41f910]
fsub qword [0x41f908]
fsubp st(1)
call fcn.0040b5b0
mov dword [0x4254a8], eax
mov eax, dword [0x427920]
push eax
push esi
lea eax, [ebx + 0x104]
push eax
push edi
lea eax, [ebx + 0x208]
push 0x168
push eax
call fcn.0040c328
fldz
xor eax, eax
fst dword [esp + 0x3c]
mov dword [esi], eax
fstp dword [esp + 0x3c]
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
push esi
mov dword [esi + 0x1c], eax
call fcn.0040bb6a
fldz
movzx ecx, word [0x425474]
movzx edx, word [0x42473c]
movsx eax, cx
imul edx, eax
mov word [0x42473c], dx
xor eax, eax
mov dword [edi], eax
fst dword [esp + 0x40]
mov dword [edi + 4], eax
fstp dword [esp + 0x40]
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], eax
push edi
mov byte [edi + 0x14], al
call fcn.0040bb6a
mov ax, word [0x425474]
movzx ecx, word [0x42473c]
mov edx, dword [0x427920]
cwde
imul ecx, eax
push 1
push edx
mov word [0x42473c], cx
call fcn.00402610
lea eax, [ebx + 0x208]
push eax
push ebx
call fcn.00401370
add esp, 0x40
push 0x370
push 0
push ebx
call fcn.0040baf0
fld dword [0x425620]
fld dword [0x42564c]
add esp, 0xc
fsub qword [0x41f900]
fucompp
fnstsw ax
test ah, 0x44
jp 0x409d27
fld dword [0x4239d8]
fsubr qword [0x41f8f8]
fcomp qword [0x41f8f0]
fnstsw ax
fld dword [0x4239d8]
fadd qword [0x41f390]
fstp dword [0x4239d8]
test ah, 0x44
jp 0x409d27
mov eax, dword [esp + 0x30]
mov cx, word [0x425c48]
dec dword [esp + 0x30]
push ebx
call fcn.0040bb6a
add esp, 4
push 0x15f90
call dword [sym.imp.KERNEL32.dll_Sleep]
fld dword [0x42541c]
fadd qword [0x41f8e8]
fmul qword [0x424768]
fstp qword [0x424768]
fld dword [0x42541c]
fadd qword [0x41f390]
fstp dword [0x42541c]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [esp + 0x24]
sub edx, 0x3afe81ac
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
push 0
fadd dword [0x424730]
fstp dword [0x424730]
inc dword [esp + 0x28]
mov eax, dword [0x427920]
push eax
call fcn.00402610
add esp, 8
test eax, eax
jne 0x409137
mov ecx, dword [0x427928]
mov edx, dword [0x427464]
push ecx
push edx
call fcn.00401370
jmp 0x409134