Function at 0x408cc0
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 0x41e448
mov eax, dword fs:[0]
push eax
sub esp, 0xf0
mov eax, dword [0x425fa0]
xor eax, esp
mov dword [esp + 0xe8], eax
push ebx
push esi
push edi
mov eax, dword [0x425fa0]
xor eax, esp
push eax
lea eax, [esp + 0x100]
mov dword fs:[0], eax
fldz
xor eax, eax
fst qword [esp + 0x3c]
mov dword [esp + 0x44], eax
mov word [esp + 0x1c], ax
fst qword [esp + 0x74]
fldz
mov dword [esp + 0x20], eax
fst dword [esp + 0x68]
mov dword [esp + 0x48], eax
mov dword [esp + 0xb0], 0xf
mov dword [esp + 0x38], eax
fst dword [esp + 0x64]
fxch st(1)
mov dword [esp + 0xac], eax
fstp qword [esp + 0x4c]
mov byte [esp + 0x9c], al
mov dword [esp + 0x30], eax
fstp dword [esp + 0x58]
fld dword [0x425e98]
push 0x118
fsub qword [0x41f880]
mov dword [esp + 0x10c], eax
fmul qword [esp + 0x40]
fstp qword [esp + 0x40]
call fcn.0040b068
push eax
mov dword [esp + 0x90], eax
call fcn.004034e0
add esp, 8
push 0
call fcn.0040af3a
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x38], ecx
fild dword [esp + 0x38]
mov ecx, dword [esp + 0x4c]
mov esi, edx
add esp, 4
cmp esi, ecx
fsub qword [esp + 0x3c]
mov edi, eax
mov dword [esp + 0x8c], edi
fadd qword [0x41f878]
mov dword [esp + 0x90], esi
fmul dword [0x424694]
fstp dword [0x424694]
fld qword [esp + 0x3c]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [esp + 0x3c]
jg 0x408df1
jl 0x408de3
cmp edi, dword [esp + 0x44]
jae 0x408df1
xor ecx, ecx
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], ecx
mov eax, edi
sub eax, dword [esp + 0x44]
mov edx, esi
sbb edx, ecx
mov dword [esp + 0x28], edx
js 0x4098da
jg 0x408e12
cmp eax, 0x708
jbe 0x4098da
mov eax, dword [esp + 0x30]
mov dword [esp + 0x34], eax
fild dword [esp + 0x34]
fsub dword [0x425c2c]
call fcn.0040b1c0
mov dword [esp + 0x30], eax
fld dword [0x425c2c]
fsub st(1)
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], esi
fstp dword [0x425c2c]
fld qword [esp + 0x74]
fld dword [str.F_vvE]
fucompp
fnstsw ax
fsubr dword [str.F_vvE]
fstp dword [str.F_vvE]
test ah, 0x44
jp 0x408e6c
mov ecx, 0x13b1
mov word [esp + 0x1c], cx
shr edi, 9
push 0x408
lea ebx, [edi + 0x55]
push 0x4236a8
mov dword [esp + 0x3c], 0
mov dword [esp + 0x5c], edi
mov dword [esp + 0x2c], ebx
call fcn.00402750
push 0xd
push 0x425640
mov dword [esp + 0x7c], eax
call fcn.00402750
mov esi, eax
push 0xaf1
push 0x423b48
mov dword [esp + 0x74], esi
call fcn.00402750
push 0x31e
push 0x425690
mov dword [esp + 0x90], eax
call fcn.00402750
add esp, 0x20
mov dword [esp + 0x60], eax
cmp edi, ebx
je 0x409540
jmp 0x408ee0
fld qword [esp + 0x3c]
mov edx, dword [0x4277a0]
fmul qword [0x41f870]
push 0
push edx
fstp qword [esp + 0x44]
call fcn.00401920
add esp, 8
test eax, eax
jne 0x408f18
mov eax, dword [0x4277a8]
mov ecx, dword [0x4272e4]
push eax
push ecx
call fcn.00401c00
add esp, 8
fld dword [esp + 0x64]
mov edx, dword [esp + 0x54]
fsubr qword [0x41f868]
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x70]
push edx
fstp dword [0x4246bc]
push eax
fld dword [esp + 0x70]
push ecx
fld dword [0x4246f0]
lea edx, [esp + 0xc0]
fadd qword [0x41f860]
push edx
fadd qword [0x41f858]
fsubp st(1)
fstp dword [esp + 0x78]
call fcn.00402b30
dec dword [0x425de0]
mov eax, dword [0x425de0]
push 0x8b
push 0x423100
mov dword [esp + 0x50], eax
call fcn.00402750
mov ebx, eax
mov eax, dword [esp + 0x74]
add esp, 0x18
mov esi, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408f90
mov edi, ebx
sub eax, esi
dec edi
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408fa0
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.004084d0
xor ecx, ecx
push 0x8b
xor eax, eax
push ecx
mov word [esp + 0x30], ax
mov word [esp + 0x34], cx
push ebx
call fcn.0040b5e0
movzx edx, word [esp + 0x34]
movzx eax, word [esp + 0x38]
add edx, eax
mov word [esp + 0x34], dx
push ebx
call fcn.0040af8b
add esp, 0x24
fld qword [0x425d20]
fsub qword [0x41f850]
fsub qword [0x4255b0]
mov ecx, dword [0x423b40]
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
faddp st(1)
call fcn.0040b1c0
cmp dword [esp + 0xb0], 0x10
mov dword [0x423b40], eax
mov eax, dword [esp + 0x9c]
jae 0x40904b
lea eax, [esp + 0x9c]
mov edx, dword [esp + 0xac]
push edx
push eax
mov eax, dword [esp + 0x74]
push eax
call fcn.004081b0
add esp, 0xc
cmp eax, 9
jl 0x40948b
mov ecx, dword [esp + 0x9c]
mov edi, 0x10
cmp dword [esp + 0xb0], edi
jae 0x409086
lea ecx, [esp + 0x9c]
mov edx, dword [ecx]
xor ecx, ecx
cmp ecx, dword [esp + 0x90]
jg 0x4090bc
jl 0x40909e
cmp edx, dword [esp + 0x8c]
jae 0x4090bc
mov cx, word [0x423b1c]
movzx edx, word [esp + 0x1c]
movsx eax, cx
imul edx, eax
mov word [0x423b1c], dx
jmp 0x40948b
lea esi, [eax - 1]
cmp esi, dword [esp + 0xac]
jbe 0x4090cd
call fcn.0040b801
mov eax, dword [esp + 0x9c]
cmp dword [esp + 0xb0], edi
jae 0x4090e4
lea eax, [esp + 0x9c]
mov byte [eax + esi], 0
mov eax, dword [0x425bec]
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
or esi, 0xffffffff
fsub qword [esp + 0x4c]
fsub qword [0x41f848]
fcomp qword [0x41f840]
fnstsw ax
fld qword [esp + 0x4c]
fadd qword [0x41f358]
fstp qword [esp + 0x4c]
add dword [0x425bec], esi
test ah, 0x44
jnp 0x409135
fld dword [0x425e2c]
fmul qword [0x41f838]
fstp dword [0x425e2c]
mov eax, dword [esp + 0x9c]
cmp dword [esp + 0xb0], edi
jae 0x40914c
lea eax, [esp + 0x9c]
lea ecx, [esp + 0xb4]
add eax, 8
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x409176
test dl, dl
je 0x409172
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x409176
add eax, 2
add ecx, 2
test dl, dl
jne 0x409156
xor eax, eax
jmp 0x40917a
sbb eax, eax
sbb eax, esi
test eax, eax
jne 0x40948b
mov cx, word [0x4247a0]
movsx edx, cx
mov dword [esp + 0x18], edx
fild dword [esp + 0x18]
fsub qword [esp + 0x4c]
mov eax, dword [str.R_nI_]
add dword [str.R_nI_], esi
inc word [0x4247a0]
sub eax, 0x37d174fc
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fcompp
fnstsw ax
test ah, 0x41
jp 0x4091d2
mov ecx, dword [0x425de4]
imul ecx, ecx, 0xd9784c45
mov dword [0x425de4], ecx
mov ebx, dword [esp + 0xb0]
mov edx, dword [esp + 0x9c]
cmp ebx, edi
jb 0x4092d1
mov edi, edx
test edx, edx
je 0x40921b
mov eax, edx
cmp ebx, 0x10
jae 0x4091fc
lea eax, [esp + 0x9c]
cmp eax, edi
ja 0x40921b
mov eax, edx
cmp ebx, 0x10
jae 0x40920e
lea eax, [esp + 0x9c]
mov ecx, dword [esp + 0xac]
add eax, ecx
cmp edi, eax
jbe 0x409235
call fcn.0040b801
mov ebx, dword [esp + 0xb0]
mov ecx, dword [esp + 0xac]
mov edx, dword [esp + 0x9c]
lea esi, [esp + 0x98]
mov dword [esp + 0x84], edi
mov dword [0x424744], 0x8c0e985c
lea ecx, [ecx]
mov eax, edx
cmp ebx, 0x10
jae 0x40925e
lea eax, [esp + 0x9c]
lea edi, [eax + ecx]
test edi, edi
je 0x40928b
mov eax, edx
cmp ebx, 0x10
jae 0x409273
lea eax, [esp + 0x9c]
cmp eax, edi
ja 0x40928b
mov eax, edx
cmp ebx, 0x10
jae 0x409285
lea eax, [esp + 0x9c]
add eax, ecx
cmp edi, eax
jbe 0x409290
call fcn.0040b801
cmp esi, 0xfffffffc
je 0x4092a9
test esi, esi
je 0x4092a4
lea edx, [esp + 0x98]
cmp esi, edx
je 0x4092a9
call fcn.0040b801
mov ebx, dword [esp + 0x84]
cmp ebx, edi
je 0x40933c
cmp esi, 0xfffffffc
je 0x4092ee
test esi, esi
jne 0x4092c6
call fcn.0040b801
cmp dword [esi + 0x18], 0x10
jb 0x4092dd
mov eax, dword [esi + 4]
jmp 0x4092e0
lea edi, [esp + 0x9c]
jmp 0x4091ee
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp ebx, ecx
jb 0x4092ee
call fcn.0040b801
mov byte [ebx], 0
cmp esi, 0xfffffffc
je 0x40931b
test esi, esi
jne 0x4092ff
call fcn.0040b801
cmp dword [esi + 0x18], 0x10
jb 0x40930a
mov eax, dword [esi + 4]
jmp 0x40930d
lea eax, [esi + 4]
mov edx, dword [esi + 0x14]
add edx, eax
cmp ebx, edx
jb 0x40931b
call fcn.0040b801
inc dword [esp + 0x84]
mov ebx, dword [esp + 0xb0]
mov ecx, dword [esp + 0xac]
mov edx, dword [esp + 0x9c]
jmp 0x409250
push 0x7e
push 0x423100
call fcn.00402750
push 0
mov esi, eax
push 0
lea eax, [esp + 0xa8]
push eax
lea ecx, [esp + 0xc8]
push esi
push ecx
call fcn.004084d0
fld qword [esp + 0x90]
fld1
add esp, 0x1c
fsub st(1), st(0)
fxch st(1)
fstp qword [esp + 0x74]
fld qword [0x424888]
fsub st(1)
fstp qword [0x424888]
fld qword [esp + 0x74]
fld qword [0x424888]
fsub qword [0x41f830]
fsub qword [0x41f828]
fcompp
fnstsw ax
test ah, 1
jne 0x4093ee
mov edx, dword [esp + 0x20]
mov dword [esp + 0x18], edx
fild dword [esp + 0x18]
fadd qword [esp + 0x4c]
fadd dword [0x425688]
mov eax, dword [esp + 0x38]
mov dword [esp + 0x38], eax
fild dword [esp + 0x38]
faddp st(1)
call fcn.0040b1c0
mov dword [esp + 0x38], eax
fld dword [0x425688]
fsub st(1)
fstp dword [0x425688]
dec dword [esp + 0x20]
fsubr qword [esp + 0x4c]
fstp qword [esp + 0x4c]
jmp 0x4093f0
fstp st(0)
xor edx, edx
push 0x7e
xor ecx, ecx
push edx
mov word [esp + 0x1c], cx
mov word [esp + 0x20], dx
push esi
call fcn.0040b5e0
movzx eax, word [esp + 0x24]
movzx ecx, word [esp + 0x20]
add eax, ecx
push esi
mov word [esp + 0x24], ax
call fcn.0040af8b
push 0xc
push 0x425658
call fcn.00402750
add esp, 0x18
mov esi, eax
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x409432
sub eax, ecx
push eax
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0xa4]
call fcn.00404ba0
xor edx, edx
mov word [esp + 0x14], dx
mov edi, eax
xor eax, eax
mov word [esp + 0x18], ax
movzx ecx, word [esp + 0x18]
movzx edx, word [esp + 0x14]
mov dword [esi], eax
mov dword [esi + 4], eax
add ecx, edx
mov dword [esi + 8], eax
push esi
mov word [esp + 0x18], cx
call fcn.0040af8b
mov eax, dword [esp + 0xb0]
add eax, 0xfffffff5
add esp, 4
cmp edi, eax
je 0x4094a3
mov eax, dword [esp + 0x54]
inc eax
mov dword [esp + 0x54], eax
cmp eax, dword [esp + 0x24]
jne 0x408ee0
jmp 0x40953c
mov cx, word [0x423acc]
movzx edx, word [esp + 0x1c]
movsx eax, cx
push 0xb
lea eax, [edx + eax + 0x29e2a8f3]
mov word [esp + 0x20], ax
push edi
lea ecx, [esp + 0xa0]
call fcn.00405b50
mov dword [esp + 0x34], 1
fld qword [0x425ca0]
fld1
fadd st(1), st(0)
fxch st(1)
fstp qword [0x425ca0]
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x24], ecx
fild dword [esp + 0x24]
fsub qword [0x425ca0]
fstp dword [esp + 0x64]
movzx edx, word [esp + 0x1c]
movsx eax, dx
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
fadd qword [0x425d10]
fadd dword [0x425cfc]
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x24], ecx
fild dword [esp + 0x24]
faddp st(1)
call fcn.0040b1c0
mov dword [esp + 0x30], eax
fadd dword [0x425cfc]
fstp dword [0x425cfc]
mov esi, dword [esp + 0x5c]
mov edi, dword [esp + 0x6c]
xor eax, eax
push 0x408
xor edx, edx
push eax
mov word [esp + 0x1c], dx
mov word [esp + 0x20], ax
push edi
call fcn.0040b5e0
movzx ecx, word [esp + 0x24]
movzx edx, word [esp + 0x20]
add ecx, edx
mov word [esp + 0x20], cx
push edi
call fcn.0040af8b
xor eax, eax
mov dword [esi], eax
mov word [esp + 0x24], ax
mov dword [esi + 4], eax
xor ecx, ecx
mov word [esp + 0x28], cx
movzx edx, word [esp + 0x28]
mov dword [esi + 8], eax
mov byte [esi + 0xc], al
movzx eax, word [esp + 0x24]
add edx, eax
mov word [esp + 0x24], dx
push esi
call fcn.0040af8b
mov esi, dword [esp + 0x74]
xor edx, edx
push 0x31e
xor ecx, ecx
push edx
mov word [esp + 0x30], cx
mov word [esp + 0x34], dx
push esi
call fcn.0040b5e0
movzx eax, word [esp + 0x38]
movzx ecx, word [esp + 0x34]
add eax, ecx
mov word [esp + 0x34], ax
push esi
call fcn.0040af8b
mov esi, dword [esp + 0x94]
xor eax, eax
push 0xaf1
xor edx, edx
push eax
mov word [esp + 0x40], dx
mov word [esp + 0x44], ax
push esi
call fcn.0040b5e0
movzx ecx, word [esp + 0x48]
movzx edx, word [esp + 0x44]
add ecx, edx
mov word [esp + 0x44], cx
push esi
call fcn.0040af8b
add dword [esp + 0x54], 0x9ea4da7
push 0x40
lea eax, [esp + 0xec]
push 0
push eax
call fcn.0040b5e0
add esp, 0x40
cmp dword [esp + 0x34], 0
je 0x4098dc
mov ecx, dword [esp + 0x88]
push 0x708
push ecx
call fcn.00404220
add esp, 8
cmp dword [esp + 0xac], 0x200
jbe 0x4098dc
push 0x370
call fcn.0040b068
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.00403640
push 3
push 0x425d30
call fcn.00402750
mov edi, eax
push edi
push ebx
call fcn.0040be5d
mov ecx, 1
add dword [esp + 0x38], ecx
fld dword [esp + 0x70]
fld1
mov esi, eax
fadd st(1), st(0)
add esp, 0x18
fxch st(1)
fstp dword [esp + 0x58]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x30]
lea edx, [eax + edx - 0x6809ad34]
mov dword [esp + 0x24], edx
fild dword [esp + 0x24]
fld dword [esp + 0x58]
fadd qword [0x41f820]
fsub qword [0x41f818]
fcompp
fnstsw ax
test ah, 5
jp 0x40971f
mov eax, dword [0x4246b4]
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
fld qword [esp + 0x4c]
fsubp st(1)
fld dword [0x425d9c]
faddp st(1)
fsubr qword [esp + 0x3c]
fstp qword [esp + 0x3c]
fsubr dword [0x425d9c]
fstp dword [0x425d9c]
add dword [0x4246b4], ecx
jmp 0x409721
fstp st(0)
xor eax, eax
xor ecx, ecx
mov word [esp + 0x14], cx
mov word [edi], ax
xor edx, edx
mov word [esp + 0x18], dx
mov byte [edi + 2], al
movzx eax, word [esp + 0x18]
movzx ecx, word [esp + 0x14]
add eax, ecx
mov word [esp + 0x14], ax
push edi
call fcn.0040af8b
mov eax, dword [esp + 0xa0]
add esp, 4
cmp dword [esp + 0xb0], 0x10
mov dword [0x4230cc], 0x724c5e89
jae 0x409773
lea eax, [esp + 0x9c]
mov edx, dword [esp + 0xac]
push esi
push 1
push edx
push eax
call fcn.0040bfd6
push esi
call fcn.0040ba03
add esp, 0x14
push 0x104
lea eax, [ebx + 0x104]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x15
push str.cuD_
call fcn.00402750
push 0x20
push 0x425cc4
mov edi, eax
call fcn.00402750
mov esi, eax
mov eax, dword [0x4277a0]
push eax
push esi
lea eax, [ebx + 0x104]
push eax
push edi
lea eax, [ebx + 0x208]
push 0x168
push eax
call fcn.0040b8dd
movzx ecx, word [0x424714]
movsx edx, cx
mov eax, 0xe6a335f7
sub eax, edx
mov dword [esp + 0x4c], eax
xor eax, eax
xor ecx, ecx
fild dword [esp + 0x4c]
xor edx, edx
push esi
fadd qword [0x425d88]
fstp qword [0x425d88]
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 word [esp + 0x40], cx
mov dword [esi + 0x18], eax
mov word [esp + 0x44], dx
mov dword [esi + 0x1c], eax
movzx eax, word [esp + 0x44]
movzx ecx, word [esp + 0x40]
add eax, ecx
mov word [esp + 0x40], ax
call fcn.0040af8b
mov edx, dword [str.O_fSG]
mov eax, 0xb8a2a351
sub eax, edx
mov dword [esp + 0x50], eax
xor eax, eax
fild dword [esp + 0x50]
xor ecx, ecx
xor edx, edx
fadd dword [0x4230d0]
fstp dword [0x4230d0]
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
mov word [esp + 0x40], cx
mov dword [edi + 0x10], eax
mov word [esp + 0x44], dx
mov byte [edi + 0x14], al
movzx eax, word [esp + 0x44]
movzx ecx, word [esp + 0x40]
add eax, ecx
mov word [esp + 0x40], ax
push edi
call fcn.0040af8b
mov edx, dword [0x4277a0]
push 1
push edx
call fcn.00401920
lea eax, [ebx + 0x208]
push eax
push ebx
call fcn.00401c00
add esp, 0x40
push 0x370
push 0
push ebx
call fcn.0040b5e0
push ebx
call fcn.0040af8b
add esp, 0x10
push 0x15f90
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4098dc
fstp st(0)
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
fld dword [0x424750]
fmul qword [esp + 0x3c]
mov eax, dword [0x4277a0]
push 0
push eax
fstp qword [esp + 0x44]
call fcn.00401920
add esp, 8
test eax, eax
jne 0x408d87
mov ecx, dword [0x4277a8]
mov edx, dword [0x4272e4]
push ecx
push edx
call fcn.00401c00
jmp 0x408d84