Function at 0x408c70
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 0x41e2f8
mov eax, dword fs:[0]
push eax
sub esp, 0xd8
mov eax, dword [0x425e20]
xor eax, esp
mov dword [esp + 0xd0], eax
push ebx
push esi
push edi
mov eax, dword [0x425e20]
xor eax, esp
push eax
lea eax, [esp + 0xe8]
mov dword fs:[0], eax
fldz
xor eax, eax
mov dword [esp + 0x34], eax
fst dword [esp + 0x30]
fst dword [esp + 0x54]
xor ecx, ecx
fldz
mov word [esp + 0x24], cx
fst qword [esp + 0x14]
mov dword [esp + 0x44], eax
fxch st(1)
mov dword [esp + 0x48], eax
fst dword [esp + 0x5c]
mov dword [esp + 0x98], 0xf
fxch st(1)
mov dword [esp + 0x94], eax
fstp qword [esp + 0x74]
mov byte [esp + 0x84], al
fst dword [esp + 0x38]
fstp dword [esp + 0x2c]
mov dword [esp + 0x28], eax
push 0x118
mov dword [esp + 0xf4], eax
call fcn.0040b0c9
push eax
mov dword [esp + 0x78], eax
call fcn.00404320
inc dword [esp + 0x2c]
fld qword [0x423108]
fld qword [esp + 0x1c]
mov dx, word [esp + 0x2c]
fadd qword [0x41f908]
movsx eax, dx
sub eax, 0x2e0e4057
mov dword [esp + 0x44], eax
fsubp st(1)
add esp, 8
fild dword [esp + 0x3c]
fcompp
fnstsw ax
fld qword [0x423108]
fld1
fadd st(1), st(0)
fxch st(1)
fstp qword [0x423108]
fld qword [esp + 0x14]
fadd st(1)
fstp qword [esp + 0x14]
test ah, 0x41
jp 0x408db3
fld qword [0x424268]
fadd qword [0x41f900]
fsubr qword [0x41f8f8]
fcomp qword [0x41f8f0]
fnstsw ax
fld qword [0x424268]
fadd st(1)
fstp qword [0x424268]
test ah, 0x41
jp 0x408ec9
mov cx, word [0x425438]
dec word [0x425438]
fstp st(0)
push 0
call fcn.0040adea
mov esi, dword [esp + 0x4c]
add esp, 4
cmp edx, esi
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], edx
jg 0x408de5
jl 0x408dd7
cmp eax, dword [esp + 0x44]
jae 0x408de5
xor esi, esi
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], esi
mov ecx, eax
sub ecx, dword [esp + 0x44]
mov edi, edx
sbb edi, esi
mov dword [esp + 0x18], edi
js 0x409802
jg 0x408e07
cmp ecx, 0x708
jbe 0x409802
fld dword [esp + 0x38]
mov edi, eax
fsub qword [0x4253f8]
shr edi, 9
push 0x408
lea ebx, [edi + 0x55]
fstp dword [esp + 0x3c]
push 0x425500
fld qword [0x4253f8]
mov dword [esp + 0x4c], eax
fsub qword [0x41f340]
mov dword [esp + 0x50], edx
mov dword [esp + 0x44], 0
mov dword [esp + 0x30], edi
fstp qword [0x4253f8]
mov dword [esp + 0x1c], ebx
call fcn.004022b0
fld dword [esp + 0x64]
mov edx, dword [0x4259b4]
fsub qword [0x41f8e8]
add edx, 0x6a12b5b2
mov dword [esp + 0x48], edx
fild dword [esp + 0x48]
mov dword [esp + 0x60], eax
add esp, 8
fcompp
fnstsw ax
test ah, 0x41
jne 0x408ef0
fld dword [esp + 0x2c]
fld1
fadd st(1), st(0)
fxch st(1)
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fadd qword [0x41f8e0]
fcomp qword [0x41f8d8]
fnstsw ax
test ah, 0x41
jne 0x408eee
fadd qword [0x425a98]
fstp qword [0x425a98]
fld qword [0x425a98]
fmul qword [0x4253f8]
fstp qword [0x4253f8]
jmp 0x408ef0
fld qword [0x425978]
fsub qword [0x41f8d0]
fmul qword [esp + 0x14]
fstp qword [esp + 0x14]
fsubr qword [0x425978]
fstp qword [0x425978]
jmp 0x408db5
fstp st(0)
push 0xd
push str.MS1
call fcn.004022b0
mov esi, eax
push 0xaf1
push 0x424770
mov dword [esp + 0x60], esi
call fcn.004022b0
push 0x31e
push 0x4231c8
mov dword [esp + 0x58], eax
call fcn.004022b0
add esp, 0x18
mov dword [esp + 0x60], eax
cmp edi, ebx
je 0x409421
mov eax, dword [0x427620]
push 0
push eax
call fcn.00401a60
add esp, 8
test eax, eax
jne 0x408f5d
mov ecx, dword [0x427628]
mov edx, dword [0x427164]
push ecx
push edx
call fcn.004029e0
add esp, 8
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x40]
push eax
push ecx
push edx
lea eax, [esp + 0xa8]
push eax
call fcn.004039f0
push 0x8b
push 0x423518
call fcn.004022b0
fld dword [0x41f8c8]
mov ebx, eax
fstp dword [0x425b14]
mov eax, dword [esp + 0x68]
add esp, 0x18
mov esi, eax
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408fa0
mov edi, ebx
sub eax, esi
dec edi
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408fb0
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 + 0x88]
push ecx
lea edx, [esp + 0xa8]
push ebx
push edx
call fcn.00408260
add esp, 0x14
fld dword [0x4230e4]
fadd qword [0x41f8c0]
fld qword [0x4252a0]
fsub qword [0x41f8b8]
fadd qword [0x41f8b0]
fcompp
fnstsw ax
fld qword [0x4252a0]
fadd qword [0x41f340]
fstp qword [0x4252a0]
test ah, 0x41
jne 0x40902f
mov ax, word [esp + 0x24]
movsx ecx, ax
sub dword [esp + 0x34], ecx
dec dword [esp + 0x24]
fldz
xor edx, edx
push 0x8b
fstp qword [esp + 0x20]
push edx
mov word [esp + 0x24], dx
push ebx
call fcn.0040b000
push ebx
call fcn.0040ae3b
fld dword [0x4230d0]
add esp, 0x10
call fcn.0040af50
mov word [esp + 0x1c], ax
fld dword [0x4230d0]
fsub qword [0x41f340]
mov eax, dword [esp + 0x84]
mov edi, 0x10
fstp dword [0x4230d0]
cmp dword [esp + 0x98], edi
jae 0x40908f
lea eax, [esp + 0x84]
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x58]
push ecx
push eax
push edx
call fcn.00407e40
movzx ecx, word [0x425434]
add ecx, 0x17abe92c
add esp, 0xc
cmp eax, 9
mov word [0x425434], cx
jl 0x4093d9
fld dword [esp + 0x30]
fadd qword [0x41f340]
fstp dword [esp + 0x30]
fld dword [0x42311c]
fld dword [esp + 0x5c]
mov edx, dword [0x42319c]
mov dword [esp + 0x1c], edx
fisub dword [esp + 0x1c]
fsub dword [esp + 0x30]
fsubp st(1)
fstp dword [0x42311c]
inc dword [0x42319c]
mov ecx, dword [esp + 0x84]
cmp dword [esp + 0x98], edi
jae 0x409111
lea ecx, [esp + 0x84]
mov edx, dword [ecx]
xor ecx, ecx
cmp ecx, dword [esp + 0x68]
jl 0x4093d9
jg 0x40912b
cmp edx, dword [esp + 0x64]
jb 0x4093d9
lea esi, [eax - 1]
cmp esi, dword [esp + 0x94]
jbe 0x40913c
call fcn.0040b75f
mov eax, dword [esp + 0x84]
cmp dword [esp + 0x98], edi
jae 0x409153
lea eax, [esp + 0x84]
mov byte [eax + esi], 0
mov esi, dword [esp + 0x98]
mov eax, dword [esp + 0x84]
cmp esi, edi
jae 0x409170
lea eax, [esp + 0x84]
lea ecx, [esp + 0x9c]
add eax, 8
lea ebx, [ebx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4091a0
test dl, dl
je 0x40919c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4091a0
add eax, 2
add ecx, 2
test dl, dl
jne 0x409180
xor eax, eax
jmp 0x4091a5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4093d9
cmp esi, edi
jb 0x40929f
mov edi, dword [esp + 0x84]
test edi, edi
je 0x409201
cmp dword [esp + 0x98], 0x10
mov eax, dword [esp + 0x84]
jae 0x4091d8
lea eax, [esp + 0x84]
cmp eax, edi
ja 0x409201
cmp dword [esp + 0x98], 0x10
mov eax, dword [esp + 0x84]
jae 0x4091f4
lea eax, [esp + 0x84]
mov ecx, dword [esp + 0x94]
add eax, ecx
cmp edi, eax
jbe 0x40920d
call fcn.0040b75f
mov ecx, dword [esp + 0x94]
lea esi, [esp + 0x80]
mov ebx, edi
mov edx, dword [esp + 0x98]
mov edi, dword [esp + 0x84]
cmp edx, 0x10
jae 0x409230
lea edi, [esp + 0x84]
add edi, ecx
je 0x409264
mov eax, dword [esp + 0x84]
cmp edx, 0x10
jae 0x409247
lea eax, [esp + 0x84]
cmp eax, edi
ja 0x409264
mov eax, dword [esp + 0x84]
cmp edx, 0x10
jae 0x40925e
lea eax, [esp + 0x84]
add eax, ecx
cmp edi, eax
jbe 0x409269
call fcn.0040b75f
cmp esi, 0xfffffffc
je 0x409282
test esi, esi
je 0x40927d
lea eax, [esp + 0x80]
cmp esi, eax
je 0x409282
call fcn.0040b75f
cmp ebx, edi
je 0x4092f6
cmp esi, 0xfffffffc
je 0x4092bc
test esi, esi
jne 0x409294
call fcn.0040b75f
cmp dword [esi + 0x18], 0x10
jb 0x4092ab
mov eax, dword [esi + 4]
jmp 0x4092ae
lea edi, [esp + 0x84]
jmp 0x4091c0
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp ebx, ecx
jb 0x4092bc
call fcn.0040b75f
mov byte [ebx], 0
cmp esi, 0xfffffffc
je 0x4092e9
test esi, esi
jne 0x4092cd
call fcn.0040b75f
cmp dword [esi + 0x18], 0x10
jb 0x4092d8
mov eax, dword [esi + 4]
jmp 0x4092db
lea eax, [esi + 4]
mov edx, dword [esi + 0x14]
add edx, eax
cmp ebx, edx
jb 0x4092e9
call fcn.0040b75f
mov ecx, dword [esp + 0x94]
inc ebx
jmp 0x409216
push 0x7e
push 0x423518
call fcn.004022b0
push 0
mov esi, eax
push 0
lea eax, [esp + 0x90]
push eax
lea ecx, [esp + 0xb0]
push esi
push ecx
call fcn.00408260
fldz
xor edx, edx
fstp qword [esp + 0x38]
push 0x7e
push edx
mov word [esp + 0x40], dx
push esi
call fcn.0040b000
push esi
call fcn.0040ae3b
fld dword [0x4230d0]
call fcn.0040af50
mov word [esp + 0x48], ax
fld dword [0x4230d0]
fsub qword [0x41f340]
push 0xc
push 0x4254dc
fstp dword [0x4230d0]
call fcn.004022b0
add esp, 0x34
mov esi, eax
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x409370
sub eax, ecx
push eax
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0x8c]
call fcn.00404fc0
fldz
mov edi, eax
fstp qword [esp + 0x1c]
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov word [esp + 0x1c], ax
push esi
mov dword [esi + 8], eax
call fcn.0040ae3b
fld dword [0x4230d0]
add esp, 4
call fcn.0040af50
mov word [esp + 0x1c], ax
fld dword [0x4230d0]
mov ecx, dword [esp + 0x94]
fsub qword [0x41f340]
add ecx, 0xfffffff5
fstp dword [0x4230d0]
cmp edi, ecx
je 0x4093ee
mov eax, dword [esp + 0x28]
inc eax
mov dword [esp + 0x28], eax
cmp eax, dword [esp + 0x14]
jne 0x408f33
jmp 0x40941d
fld dword [esp + 0x54]
push 0xb
fadd qword [0x41f8a8]
push edi
lea ecx, [esp + 0x88]
fadd qword [0x425480]
fadd dword [esp + 0x5c]
fstp dword [esp + 0x5c]
call fcn.00405ee0
mov dword [esp + 0x3c], 1
mov esi, dword [esp + 0x50]
fldz
mov edi, dword [esp + 0x58]
xor edx, edx
fstp qword [esp + 0x14]
push 0x408
push edx
mov word [esp + 0x24], dx
push edi
call fcn.0040b000
push edi
call fcn.0040ae3b
fld dword [0x4230d0]
call fcn.0040af50
mov word [esp + 0x2c], ax
fld dword [0x4230d0]
fsub qword [0x41f340]
xor eax, eax
push esi
fstp dword [0x4230d0]
mov dword [esi], eax
fldz
mov dword [esi + 4], eax
mov dword [esi + 8], eax
fstp qword [esp + 0x28]
mov word [esp + 0x30], ax
mov byte [esi + 0xc], al
call fcn.0040ae3b
fld dword [0x4230d0]
call fcn.0040af50
mov esi, dword [esp + 0x74]
mov word [esp + 0x30], ax
fld dword [0x4230d0]
fsub qword [0x41f340]
xor ecx, ecx
push 0x31e
push ecx
fstp dword [0x4230d0]
push esi
fldz
fstp qword [esp + 0x34]
mov word [esp + 0x3c], cx
call fcn.0040b000
push esi
call fcn.0040ae3b
fld dword [0x4230d0]
call fcn.0040af50
mov esi, dword [esp + 0x64]
mov word [esp + 0x40], ax
fld dword [0x4230d0]
fsub qword [0x41f340]
xor edx, edx
push 0xaf1
push edx
fstp dword [0x4230d0]
push esi
fldz
fstp qword [esp + 0x44]
mov word [esp + 0x4c], dx
call fcn.0040b000
push esi
call fcn.0040ae3b
fld dword [0x4230d0]
call fcn.0040af50
mov word [esp + 0x50], ax
fld dword [0x4230d0]
fsub qword [0x41f340]
push 0x40
lea eax, [esp + 0xd4]
push 0
push eax
fstp dword [0x4230d0]
call fcn.0040b000
add esp, 0x40
cmp dword [esp + 0x3c], 0
je 0x409802
mov ecx, dword [esp + 0x70]
push 0x708
push ecx
call fcn.00403ec0
add esp, 8
cmp dword [esp + 0x94], 0x200
jbe 0x409802
push 0x370
call fcn.0040b0c9
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.00404540
push 3
push str.5XpU
call fcn.004022b0
mov esi, eax
push esi
push ebx
call fcn.0040bd0c
fld dword [0x423170]
fadd qword [0x41f8a0]
mov edi, eax
call fcn.0040af50
mov dword [esp + 0x40], eax
fld dword [0x423170]
fsub qword [0x41f340]
xor eax, eax
xor edx, edx
push esi
fstp dword [0x423170]
mov word [esi], ax
fldz
mov byte [esi + 2], al
fstp qword [esp + 0x30]
mov word [esp + 0x38], dx
call fcn.0040ae3b
fld dword [0x4230d0]
add esp, 0x1c
call fcn.0040af50
mov word [esp + 0x1c], ax
fld dword [0x4230d0]
cmp dword [esp + 0x98], 0x10
fsub qword [0x41f340]
mov eax, dword [esp + 0x84]
fstp dword [0x4230d0]
jae 0x409630
lea eax, [esp + 0x84]
mov ecx, dword [esp + 0x94]
push edi
push 1
push ecx
push eax
call fcn.0040be85
push edi
call fcn.0040b8b2
add esp, 0x14
push 0x104
lea eax, [ebx + 0x104]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x15
push 0x4241c4
call fcn.004022b0
fld qword [0x425290]
fmul qword [0x41f898]
push 0x20
push 0x423150
mov edi, eax
fstp qword [0x425290]
call fcn.004022b0
add dword [esp + 0x44], 0x69b2ae10
mov edx, dword [0x427620]
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.0040b553
fld dword [0x425474]
mov ax, word [0x42549c]
movzx ecx, word [0x4252b0]
cwde
movsx edx, cx
sub edx, eax
add edx, 0x70bdfac0
mov dword [esp + 0x3c], edx
xor eax, eax
push esi
fisub dword [esp + 0x40]
fstp dword [0x425474]
mov dword [esi], eax
fldz
mov dword [esi + 4], eax
mov dword [esi + 8], eax
fstp qword [esp + 0x40]
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov word [esp + 0x48], ax
mov dword [esi + 0x1c], eax
call fcn.0040ae3b
fld dword [0x4230d0]
call fcn.0040af50
mov word [esp + 0x48], ax
fld dword [0x4230d0]
fsub qword [0x41f340]
xor eax, eax
xor ecx, ecx
push edi
fstp dword [0x4230d0]
mov dword [edi], eax
fldz
mov dword [edi + 4], eax
mov dword [edi + 8], eax
fstp qword [esp + 0x44]
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], eax
mov word [esp + 0x4c], cx
mov byte [edi + 0x14], al
call fcn.0040ae3b
fld dword [0x4230d0]
call fcn.0040af50
mov word [esp + 0x4c], ax
fld dword [0x4230d0]
fsub qword [0x41f340]
mov eax, 0x9720b7b1
push 1
fstp dword [0x4230d0]
mov dx, word [0x425910]
movsx ecx, dx
mov edx, dword [esp + 0x5c]
sub eax, ecx
sub eax, edx
mov dword [esp + 0x48], eax
fild dword [esp + 0x48]
fadd dword [esp + 0x6c]
fstp dword [esp + 0x6c]
inc dword [esp + 0x5c]
mov eax, dword [0x427620]
push eax
call fcn.00401a60
lea eax, [ebx + 0x208]
push eax
push ebx
call fcn.004029e0
add esp, 0x40
push 0x370
push 0
push ebx
call fcn.0040b000
movzx ecx, word [0x4259b8]
movsx edx, cx
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
fadd qword [0x424258]
call fcn.0040af50
push ebx
mov word [0x4259b8], ax
call fcn.0040ae3b
add esp, 0x10
push 0x15f90
call dword [sym.imp.KERNEL32.dll_Sleep]
fld qword [esp + 0x74]
mov ax, word [0x425408]
fadd qword [0x41f890]
movsx ecx, ax
mov dword [esp + 0x14], ecx
fsubr qword [0x41f888]
fild dword [esp + 0x14]
fucompp
fnstsw ax
test ah, 0x44
jnp 0x409852
fld dword [esp + 0x30]
fadd qword [0x41f880]
fcomp qword [0x41f878]
fnstsw ax
test ah, 0x44
jnp 0x409852
mov dx, word [esp + 0x24]
fld dword [esp + 0x30]
inc dword [esp + 0x24]
fstp st(0)
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
fld dword [esp + 0x2c]
fsub qword [0x41f340]
push 0
fstp dword [esp + 0x30]
mov eax, dword [0x42594c]
add eax, 0x7f797d46
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fadd dword [esp + 0x30]
fmul qword [0x4253f8]
mov ecx, dword [0x427620]
push ecx
fstp qword [0x4253f8]
call fcn.00401a60
add esp, 8
test eax, eax
jne 0x408db5
fld qword [0x424268]
mov edx, dword [0x425a10]
fsubr qword [0x41f870]
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fmulp st(1)
call fcn.0040af50
mov ecx, dword [0x427164]
mov dword [0x425a10], eax
mov eax, dword [0x427628]
push eax
push ecx
call fcn.004029e0
add esp, 8
jmp 0x408db5