Function at 0x408b00
Capabilities:
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41e228
mov eax, dword fs:[0]
push eax
sub esp, 0xf0
mov eax, dword [0x425fe0]
xor eax, esp
mov dword [esp + 0xe8], eax
push ebx
push esi
push edi
mov eax, dword [0x425fe0]
xor eax, esp
push eax
lea eax, [esp + 0x100]
mov dword fs:[0], eax
fldz
xor eax, eax
mov word [esp + 0x20], ax
xor ecx, ecx
mov word [esp + 0x10], cx
fstp dword [esp + 0x40]
fldz
xor edx, edx
fst qword [esp + 0x5c]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x28], eax
fst qword [esp + 0x74]
mov word [esp + 0x30], dx
mov word [esp + 0x2c], cx
fst qword [esp + 0x44]
fstp qword [esp + 0x84]
mov dword [esp + 0x50], eax
mov dword [esp + 0xb0], 0xf
mov dword [esp + 0xac], eax
mov byte [esp + 0x9c], al
push 0x118
mov dword [esp + 0x10c], eax
call fcn.0040aeea
push eax
mov dword [esp + 0x9c], eax
call fcn.00402490
add esp, 8
jmp 0x408bc0
push 0
call fcn.0040ad1a
mov ecx, dword [esp + 0x54]
add esp, 4
cmp edx, ecx
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], edx
jg 0x408bf0
jl 0x408be2
cmp eax, dword [esp + 0x4c]
jae 0x408bf0
xor ecx, ecx
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], ecx
sub eax, dword [esp + 0x4c]
sbb edx, ecx
mov dword [esp + 0x18], edx
js 0x40981d
jg 0x408c0d
cmp eax, 0x708
jbe 0x40981d
movzx edx, word [esp + 0x10]
mov edi, dword [esp + 0x6c]
mov eax, dword [esp + 0x70]
add edx, 0x6b81f022
mov word [esp + 0x10], dx
mov cx, word [esp + 0x10]
movsx edx, cx
cmp edx, 0x8fe9e09f
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], eax
mov dword [esp + 0x68], 0
jle 0x408c55
movzx eax, word [esp + 0x20]
imul eax, eax, 0x676921d6
mov word [esp + 0x20], ax
fld qword [esp + 0x5c]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [esp + 0x5c]
mov cx, word [esp + 0x30]
movsx edx, cx
mov dword [esp + 0x24], edx
mov ecx, 0xf3de79a9
fild dword [esp + 0x24]
fadd qword [esp + 0x5c]
mov eax, dword [0x424748]
sub ecx, eax
mov dword [esp + 0x24], ecx
fild dword [esp + 0x24]
mov ecx, 1
add dword [esp + 0x30], ecx
fcompp
fnstsw ax
test ah, 5
jp 0x408cb3
movzx edx, word [0x425378]
add edx, 0x2607c1da
mov word [0x425378], dx
jmp 0x408cd7
mov ax, word [0x4241a0]
movzx edx, word [esp + 0x2c]
cwde
lea eax, [edx + eax + 0x5426b057]
mov word [0x42477c], ax
dec word [0x4241a0]
add dword [esp + 0x2c], ecx
fld qword [0x423e40]
shr edi, 9
fadd qword [esp + 0x44]
mov cx, word [esp + 0x20]
movsx edx, cx
mov dword [esp + 0x24], edx
fsub qword [0x41f918]
mov dword [esp + 0x58], edi
fild dword [esp + 0x24]
faddp st(1)
call fcn.0040adf0
mov word [esp + 0x20], ax
fld qword [0x423e40]
fadd st(1)
lea ebx, [edi + 0x55]
mov dword [esp + 0x14], ebx
fstp qword [0x423e40]
fld qword [0x424740]
mov ax, word [esp + 0x30]
fadd qword [0x41f910]
movsx ecx, ax
sub ecx, 0x1293fbac
mov dword [esp + 0x24], ecx
fsubr qword [0x41f908]
fild dword [esp + 0x24]
fcompp
fnstsw ax
fadd qword [0x424740]
fstp qword [0x424740]
test ah, 0x41
jne 0x408d7d
mov dx, word [esp + 0x20]
movsx eax, dx
sub eax, 0x74f10ac9
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
fmul dword [0x424488]
fstp dword [0x424488]
push 0x408
push 0x4259b0
call fcn.00401340
mov ecx, 0xffff844e
push 0xd
push 0x423d9c
mov dword [esp + 0xa0], eax
mov word [esp + 0x20], cx
call fcn.00401340
mov esi, eax
push 0xaf1
push 0x4247f8
mov dword [esp + 0x7c], esi
call fcn.00401340
push 0x31e
push 0x423e60
mov dword [esp + 0x44], eax
call fcn.00401340
add esp, 0x20
mov dword [esp + 0x80], eax
cmp edi, ebx
je 0x409274
mov edx, dword [0x427800]
push 0
push edx
call fcn.004018f0
add esp, 8
test eax, eax
jne 0x408e0d
mov eax, dword [0x427808]
mov ecx, dword [0x427344]
push eax
push ecx
call fcn.004027a0
add esp, 8
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x24]
push edx
push eax
push ecx
lea edx, [esp + 0xc0]
push edx
call fcn.004033c0
push 0x8b
push 0x423dc0
call fcn.00401340
mov ebx, eax
mov eax, dword [esp + 0x7c]
add esp, 0x18
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408e46
mov edi, ebx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408e52
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x2710
mov ecx, eax
push 0
and ecx, 3
lea eax, [esp + 0xa0]
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xc0]
push ebx
push ecx
call fcn.004081a0
push 0x8b
fldz
push 0
fstp qword [esp + 0x50]
push ebx
mov dword [esp + 0x54], 0
call fcn.0040b3d0
push ebx
call fcn.0040b325
mov eax, dword [esp + 0xc0]
add esp, 0x24
cmp dword [esp + 0xb0], 0x10
jae 0x408ec1
lea eax, [esp + 0x9c]
mov edx, dword [esp + 0xac]
push edx
push eax
mov eax, dword [esp + 0x98]
push eax
call fcn.00407e30
add esp, 0xc
cmp eax, 9
jl 0x409244
mov ecx, dword [esp + 0x9c]
mov edi, 0x10
cmp dword [esp + 0xb0], edi
jae 0x408eff
lea ecx, [esp + 0x9c]
mov edx, dword [ecx]
xor ecx, ecx
cmp ecx, dword [esp + 0x70]
jl 0x409244
jg 0x408f19
cmp edx, dword [esp + 0x6c]
jb 0x409244
add dword [esp + 0x28], 0xc7f081cb
inc dword [esp + 0x28]
lea esi, [eax - 1]
cmp esi, dword [esp + 0xac]
jbe 0x408f36
call fcn.0040bcad
mov eax, dword [esp + 0x9c]
cmp dword [esp + 0xb0], edi
jae 0x408f4d
lea eax, [esp + 0x9c]
mov byte [eax + esi], 0
mov esi, dword [esp + 0xb0]
mov ebx, dword [esp + 0x9c]
mov eax, ebx
cmp esi, edi
jae 0x408f6c
lea eax, [esp + 0x9c]
lea ecx, [esp + 0xb4]
add eax, 8
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x408f96
test dl, dl
je 0x408f92
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x408f96
add eax, 2
add ecx, 2
test dl, dl
jne 0x408f76
xor eax, eax
jmp 0x408f9b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x408fc0
fld dword [0x424218]
fld qword [0x4247e0]
fld dword [0x423d10]
faddp st(2)
fsubrp st(1)
fstp qword [0x4247e0]
jmp 0x409244
cmp esi, edi
jb 0x4090d6
mov edi, ebx
test ebx, ebx
je 0x408ffb
mov eax, ebx
cmp esi, 0x10
jae 0x408fdc
lea eax, [esp + 0x9c]
cmp eax, edi
ja 0x408ffb
mov eax, ebx
cmp esi, 0x10
jae 0x408fee
lea eax, [esp + 0x9c]
mov ecx, dword [esp + 0xac]
add eax, ecx
cmp edi, eax
jbe 0x409007
call fcn.0040bcad
mov ecx, dword [esp + 0xac]
lea esi, [esp + 0x98]
mov ebx, edi
cmp dword [esp + 0xb0], 0x10
mov edx, dword [esp + 0x9c]
mov eax, edx
jae 0x40902a
lea eax, [esp + 0x9c]
lea edi, [eax + ecx]
test edi, edi
je 0x409061
cmp dword [esp + 0xb0], 0x10
mov eax, edx
jae 0x409044
lea eax, [esp + 0x9c]
cmp eax, edi
ja 0x409061
cmp dword [esp + 0xb0], 0x10
mov eax, edx
jae 0x40905b
lea eax, [esp + 0x9c]
add eax, ecx
cmp edi, eax
jbe 0x409066
call fcn.0040bcad
cmp esi, 0xfffffffc
je 0x40907f
test esi, esi
je 0x40907a
lea ecx, [esp + 0x98]
cmp esi, ecx
je 0x40907f
call fcn.0040bcad
cmp ebx, edi
je 0x40913e
mov dx, word [esp + 0x30]
movsx eax, dx
mov dword [esp + 0x34], eax
fild dword [esp + 0x34]
fadd dword [esp + 0x40]
mov cx, word [esp + 0x2c]
movsx edx, cx
mov dword [esp + 0x34], edx
fadd qword [0x41f900]
fild dword [esp + 0x34]
fmulp st(1)
call fcn.0040adf0
mov word [esp + 0x2c], ax
cmp esi, 0xfffffffc
je 0x4090f3
test esi, esi
jne 0x4090cb
call fcn.0040bcad
cmp dword [esi + 0x18], 0x10
jb 0x4090e2
mov eax, dword [esi + 4]
jmp 0x4090e5
lea edi, [esp + 0x9c]
jmp 0x408fce
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp ebx, ecx
jb 0x4090f3
call fcn.0040bcad
movzx edx, word [esp + 0x30]
movzx eax, word [esp + 0x10]
add edx, eax
mov byte [ebx], 0
mov word [esp + 0x10], dx
cmp esi, 0xfffffffc
je 0x409131
test esi, esi
jne 0x409115
call fcn.0040bcad
cmp dword [esi + 0x18], 0x10
jb 0x409120
mov eax, dword [esi + 4]
jmp 0x409123
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp ebx, ecx
jb 0x409131
call fcn.0040bcad
mov ecx, dword [esp + 0xac]
inc ebx
jmp 0x409010
push 0x7e
push 0x423dc0
call fcn.00401340
xor ebx, ebx
push ebx
push ebx
lea edx, [esp + 0xa8]
mov esi, eax
push edx
lea eax, [esp + 0xc8]
push esi
push eax
call fcn.004081a0
fldz
push 0x7e
fstp qword [esp + 0x54]
push ebx
push esi
mov dword [esp + 0x5c], ebx
call fcn.0040b3d0
push esi
call fcn.0040b325
push 0xc
push 0x42535c
call fcn.00401340
add esp, 0x34
mov esi, eax
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x409193
sub eax, ecx
push eax
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0xa4]
call fcn.00404640
mov cx, word [esp + 0x10]
movsx edx, cx
mov dword [esp + 0x34], edx
mov edi, eax
fild dword [esp + 0x34]
fadd qword [0x425928]
call fcn.0040adf0
fldz
mov word [esp + 0x10], ax
fstp qword [esp + 0x34]
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esp + 0x34], ebx
push esi
mov dword [esi + 8], eax
call fcn.0040b325
fld dword [0x424308]
fadd qword [0x41f358]
add esp, 4
fstp dword [0x424308]
fld dword [0x424308]
fcomp qword [0x41f8f8]
fnstsw ax
test ah, 1
jne 0x409236
mov eax, dword [0x424290]
mov dword [esp + 0x34], eax
fild dword [esp + 0x34]
fld qword [esp + 0x84]
fadd qword [0x41f8f0]
faddp st(1)
call fcn.0040adf0
mov word [esp + 0x20], ax
mov ecx, dword [esp + 0xac]
add ecx, 0xfffffff5
cmp edi, ecx
je 0x409259
mov eax, dword [esp + 0x58]
inc eax
mov dword [esp + 0x58], eax
cmp eax, dword [esp + 0x14]
jne 0x408de3
jmp 0x409270
push 0xb
push edi
lea ecx, [esp + 0xa0]
call fcn.00406440
mov dword [esp + 0x68], 1
mov esi, dword [esp + 0x64]
fldz
mov ebx, dword [esp + 0x90]
xor edi, edi
fstp qword [esp + 0x14]
push 0x408
push edi
mov dword [esp + 0x1c], edi
push ebx
call fcn.0040b3d0
push ebx
call fcn.0040b325
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], edi
push esi
mov byte [esi + 0xc], al
call fcn.0040b325
fld dword [0x425350]
fadd dword [0x424210]
add esp, 0x14
fld dword [0x42418c]
mov dx, word [0x423d08]
fsub qword [0x41f8e8]
movsx eax, dx
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fsubp st(1)
fcompp
fnstsw ax
fld dword [0x425350]
fld1
fadd st(1), st(0)
fxch st(1)
fstp dword [0x425350]
test ah, 1
jne 0x409391
mov cx, word [esp + 0x10]
mov eax, dword [0x423d94]
movsx edx, cx
sub edx, eax
add edx, 0x590a1ac7
mov dword [esp + 0x14], edx
mov ecx, 1
fild dword [esp + 0x14]
fld qword [0x4242f0]
fadd qword [0x41f8e0]
fsub qword [0x41f8d8]
fcompp
fnstsw ax
fld qword [0x4242f0]
fadd st(1)
fstp qword [0x4242f0]
add dword [esp + 0x10], ecx
add dword [0x423d94], ecx
test cl, ah
jne 0x40937f
fsubr qword [esp + 0x84]
fstp qword [esp + 0x84]
fld qword [esp + 0x84]
fadd qword [0x41f8d0]
fadd qword [0x41f8c8]
fstp qword [esp + 0x44]
jmp 0x4093a2
mov cx, word [esp + 0x30]
movsx edx, cx
add edx, dword [esp + 0x28]
mov dword [esp + 0x28], edx
jmp 0x4093a0
movzx eax, word [esp + 0x2c]
add eax, 0x5b7c9f7e
mov word [esp + 0x2c], ax
fstp st(0)
fldz
mov esi, dword [esp + 0x80]
push 0x31e
fstp qword [esp + 0x18]
push edi
mov dword [esp + 0x1c], edi
push esi
call fcn.0040b3d0
push esi
call fcn.0040b325
fldz
mov esi, dword [esp + 0x34]
fstp qword [esp + 0x24]
push 0xaf1
push edi
push esi
mov dword [esp + 0x30], edi
call fcn.0040b3d0
push esi
call fcn.0040b325
push 0x40
lea ecx, [esp + 0xd8]
push edi
push ecx
call fcn.0040b3d0
add esp, 0x2c
cmp dword [esp + 0x68], edi
je 0x40981d
mov edx, dword [esp + 0x94]
push 0x708
push edx
call fcn.00402870
add esp, 8
cmp dword [esp + 0xac], 0x200
jbe 0x40981d
push 0x370
call fcn.0040aeea
mov ebx, eax
mov eax, dword [str.G2R]
add eax, 0x773f49eb
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
or edi, 0xffffffff
add esp, 4
fadd qword [esp + 0x44]
mov cx, word [esp + 0x10]
add dword [esp + 0x10], edi
movsx edx, cx
add edx, 0x5713cec3
mov dword [esp + 0x14], edx
mov ecx, 1
add dword [str.G2R], ecx
fild dword [esp + 0x14]
fucompp
fnstsw ax
test ah, 0x44
jnp 0x40949f
add dword [0x4247f4], ecx
fld dword [esp + 0x40]
mov eax, dword [0x4247f4]
mov dword [esp + 0x14], eax
fisub dword [esp + 0x14]
fadd dword [0x423d58]
fstp qword [esp + 0x5c]
push ebx
push 0xeb
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
fld dword [esp + 0x40]
fadd qword [esp + 0x74]
fsub qword [0x41f8c0]
fstp dword [0x424418]
fld qword [esp + 0x74]
fsub qword [0x41f358]
fstp qword [esp + 0x74]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push ebx
call fcn.00402ac0
push 3
push 0x423d14
call fcn.00401340
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x24], ecx
fild dword [esp + 0x24]
mov esi, eax
push esi
push ebx
fmul qword [esp + 0x5c]
fstp qword [esp + 0x5c]
add dword [esp + 0x40], edi
call fcn.0040b81f
fldz
mov edi, eax
fstp qword [esp + 0x2c]
xor eax, eax
mov word [esi], ax
push esi
mov dword [esp + 0x30], eax
mov byte [esi + 2], al
call fcn.0040b325
mov eax, dword [esp + 0xb8]
add esp, 0x1c
cmp dword [esp + 0xb0], 0x10
jae 0x40953c
lea eax, [esp + 0x9c]
mov edx, dword [esp + 0xac]
push edi
push 1
push edx
push eax
call fcn.0040b6d9
push edi
call fcn.0040b4fb
fld qword [esp + 0x58]
fsub qword [0x41f8b8]
add esp, 0x14
push 0x104
lea eax, [ebx + 0x104]
fsub qword [0x41f8b0]
push eax
push 0
fmul qword [esp + 0x80]
fstp qword [esp + 0x80]
fld qword [esp + 0x50]
fadd qword [0x41f358]
fstp qword [esp + 0x50]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x15
push 0x4258c4
call fcn.00401340
mov edi, eax
mov ax, word [esp + 0x18]
movsx ecx, ax
mov edx, 0x2cb2ea3a
sub edx, ecx
add edx, dword [0x425970]
push 0x20
mov dword [esp + 0x20], edx
push 0x42598c
fild dword [esp + 0x24]
fmul dword [esp + 0x50]
fstp dword [esp + 0x50]
dec dword [0x425970]
call fcn.00401340
mov esi, eax
mov eax, dword [0x427800]
push eax
push esi
lea eax, [ebx + 0x104]
push eax
push edi
lea eax, [ebx + 0x208]
push 0x168
push eax
call fcn.0040bd89
fldz
xor eax, eax
fstp qword [esp + 0x3c]
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 dword [esi + 0x18], eax
mov dword [esp + 0x3c], eax
push esi
mov dword [esi + 0x1c], eax
call fcn.0040b325
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], eax
mov byte [edi + 0x14], al
call fcn.0040b325
mov ecx, dword [0x427800]
push 1
push ecx
call fcn.004018f0
add esp, 0x38
fld qword [0x425dd8]
fsubr qword [0x41f8a8]
fcomp qword [0x41f8a0]
fnstsw ax
fld qword [0x425dd8]
fld1
fadd st(1), st(0)
fxch st(1)
fstp qword [0x425dd8]
test ah, 0x41
jne 0x4096ee
mov eax, 0xffffffff
add dword [esp + 0x10], eax
movzx edx, word [esp + 0x10]
movsx ecx, dx
movzx edx, word [0x424288]
inc word [0x424288]
movsx edx, dx
sub ecx, 0x4c5dcffd
cmp edx, ecx
jle 0x409704
add dword [esp + 0x2c], eax
fld qword [0x424798]
fsub st(1)
fstp qword [0x424798]
fld qword [0x424798]
fstp st(0)
fld qword [0x4242d0]
fstp st(0)
fld qword [0x4243f8]
mov ax, word [esp + 0x2c]
fstp st(0)
fadd qword [0x4243f8]
fstp qword [0x4243f8]
jmp 0x409706
mov ecx, dword [esp + 0x28]
fstp st(0)
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
fstp dword [0x424210]
jmp 0x409706
fstp st(0)
lea eax, [ebx + 0x208]
push eax
push ebx
call fcn.004027a0
push 0x370
push 0
push ebx
call fcn.0040b3d0
mov dx, word [0x424344]
movsx eax, dx
add eax, 0x475e4e5b
add esp, 0x14
cmp eax, 0x21818fa2
je 0x40974b
fld qword [0x424440]
fsubr qword [0x41f898]
fstp qword [0x423d88]
push ebx
call fcn.0040b325
mov cx, word [0x42531c]
mov dx, word [esp + 0x24]
movsx eax, cx
movsx ecx, dx
sub eax, ecx
mov dword [esp + 0x18], eax
add esp, 4
push 0x15f90
fild dword [esp + 0x18]
fstp dword [0x424488]
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [esp + 0x28]
mov ax, word [0x425974]
movsx ecx, ax
sub edx, 0x498f4c30
cmp ecx, edx
jl 0x4097c9
mov dx, word [0x423d0c]
movsx eax, dx
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fadd qword [esp + 0x5c]
call fcn.0040adf0
mov word [0x423d0c], ax
fld qword [esp + 0x5c]
fadd qword [0x41f358]
fstp qword [esp + 0x5c]
jmp 0x40981d
fld qword [esp + 0x44]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [esp + 0x44]
fld qword [0x424180]
fld qword [esp + 0x44]
fadd qword [0x41f890]
fcompp
fnstsw ax
fsubr qword [0x424180]
fstp qword [0x424180]
test ah, 0x41
jp 0x40981d
fld dword [0x4243c4]
fld qword [esp + 0x84]
fsub qword [0x41f888]
fsub qword [0x41f880]
fsubp st(1)
fstp dword [0x4243c4]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [0x427800]
push 0
push ecx
call fcn.004018f0
add esp, 8
test eax, eax
jne 0x408bc0
mov edx, dword [0x427808]
mov eax, dword [0x427344]
push edx
push eax
call fcn.004027a0
jmp 0x408bb8