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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41e688
mov eax, dword fs:[0]
push eax
sub esp, 0xd8
mov eax, dword [0x425e98]
xor eax, esp
mov dword [esp + 0xd0], eax
push ebx
push esi
push edi
mov eax, dword [0x425e98]
xor eax, esp
push eax
lea eax, [esp + 0xe8]
mov dword fs:[0], eax
fldz
xor eax, eax
fst qword [esp + 0x4c]
xor ecx, ecx
fst qword [esp + 0x74]
xor edx, edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x20], eax
mov word [esp + 0x44], cx
mov word [esp + 0x48], dx
fstp qword [esp + 0x6c]
fldz
mov dword [esp + 0x34], eax
fstp dword [esp + 0x64]
mov dword [esp + 0x38], eax
mov dword [esp + 0x98], 0xf
mov dword [esp + 0x94], eax
mov byte [esp + 0x84], al
push 0x118
mov dword [esp + 0xf4], eax
call fcn.0040b33b
push eax
mov dword [esp + 0x84], eax
call fcn.004035a0
add esp, 8
push 0
call fcn.0040b18a
mov cx, word [str.x5_k]
mov esi, dword [0x424ca4]
movsx ecx, cx
add ecx, 0xfe169464
sub esi, 0x2aa51bec
add esp, 4
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], edx
cmp ecx, esi
je 0x408f7e
fld qword [esp + 0x74]
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x30], ecx
fild dword [esp + 0x30]
fsubp st(1)
fstp qword [esp + 0x74]
mov esi, dword [esp + 0x38]
cmp edx, esi
jg 0x408f9c
jl 0x408f8e
cmp eax, dword [esp + 0x34]
jae 0x408f9c
xor esi, esi
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], esi
mov ecx, eax
sub ecx, dword [esp + 0x34]
mov edi, edx
sbb edi, esi
mov dword [esp + 0x18], edi
js 0x4097f3
jg 0x408fbe
cmp ecx, 0x708
jbe 0x4097f3
mov esi, eax
shr esi, 9
push 0x408
lea edi, [esi + 0x55]
push 0x424740
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], edx
mov dword [esp + 0x38], 0
mov dword [esp + 0x44], esi
mov dword [esp + 0x1c], edi
call fcn.00401c30
push 0xd
push 0x424b80
mov dword [esp + 0x70], eax
call fcn.00401c30
mov ebx, eax
push 0xaf1
push 0x424ca8
mov dword [esp + 0x58], ebx
call fcn.00401c30
fld qword [esp + 0x64]
fsub qword [0x41f908]
push 0x31e
push 0x423460
mov dword [esp + 0x7c], eax
fstp qword [esp + 0x6c]
call fcn.00401c30
add dword [esp + 0x48], 0x742ace49
add esp, 0x20
mov dword [esp + 0x68], eax
cmp esi, edi
je 0x4094d4
lea ebx, [ebx]
mov edx, dword [0x4276a0]
push 0
push edx
call fcn.004011a0
add esp, 8
test eax, eax
jne 0x40907a
mov eax, dword [0x4276a8]
mov ecx, dword [0x4271e4]
push eax
push ecx
call fcn.004010c0
add esp, 8
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x5c]
push edx
push eax
push ecx
lea edx, [esp + 0xa8]
push edx
call fcn.00403930
push 0x8b
push 0x424be0
call fcn.00401c30
mov ebx, eax
mov eax, dword [esp + 0x38]
add esp, 0x18
imul eax, eax, 0x46e3fda3
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x40]
mov esi, eax
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4090c0
mov edi, ebx
sub eax, esi
dec edi
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4090d0
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 [esp + 0x2c]
imul ecx, ecx, 0x688885c3
push 0x2710
push 0
lea edx, [esp + 0x88]
push edx
lea eax, [esp + 0xa8]
push ebx
mov dword [esp + 0x3c], ecx
push eax
call fcn.00408560
xor eax, eax
push 0x8b
push eax
mov dword [esp + 0x2c], eax
push ebx
mov dword [esp + 0x30], eax
call fcn.0040b840
push ebx
call fcn.0040b25e
mov eax, dword [esp + 0xa8]
add esp, 0x24
cmp dword [esp + 0x98], 0x10
jae 0x409148
lea eax, [esp + 0x84]
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x60]
push ecx
push eax
push edx
call fcn.00408320
mov ecx, dword [0x42312c]
imul ecx, ecx, 0x85cd001e
add esp, 0xc
cmp eax, 9
mov dword [0x42312c], ecx
jl 0x4094a4
mov ecx, dword [esp + 0x84]
mov edi, 0x10
cmp dword [esp + 0x98], edi
jae 0x409195
lea ecx, [esp + 0x84]
mov edx, dword [ecx]
xor ecx, ecx
cmp ecx, dword [esp + 0x70]
jl 0x4094a4
jg 0x4091af
cmp edx, dword [esp + 0x6c]
jb 0x4094a4
lea esi, [eax - 1]
cmp esi, dword [esp + 0x94]
jbe 0x4091c0
call fcn.0040ba51
mov eax, dword [esp + 0x84]
cmp dword [esp + 0x98], edi
jae 0x4091d7
lea eax, [esp + 0x84]
mov byte [eax + esi], 0
mov eax, dword [esp + 0x84]
cmp dword [esp + 0x98], edi
jae 0x4091f2
lea eax, [esp + 0x84]
lea ecx, [esp + 0x9c]
add eax, 8
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x409220
test dl, dl
je 0x40921c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x409220
add eax, 2
add ecx, 2
test dl, dl
jne 0x409200
xor eax, eax
jmp 0x409225
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4094a4
mov dx, word [esp + 0x44]
movsx eax, dx
sub dword [0x425cf8], eax
inc dword [esp + 0x44]
mov ecx, dword [esp + 0x98]
mov ebx, dword [esp + 0x84]
cmp ecx, edi
jb 0x40932c
mov edi, ebx
test ebx, ebx
je 0x409288
mov eax, ebx
cmp ecx, 0x10
jae 0x409269
lea eax, [esp + 0x84]
cmp eax, edi
ja 0x409288
mov eax, ebx
cmp ecx, 0x10
jae 0x40927b
lea eax, [esp + 0x84]
mov edx, dword [esp + 0x94]
add eax, edx
cmp edi, eax
jbe 0x4092a2
call fcn.0040ba51
mov ecx, dword [esp + 0x98]
mov edx, dword [esp + 0x94]
mov ebx, dword [esp + 0x84]
lea esi, [esp + 0x80]
mov dword [esp + 0x58], edi
lea ecx, [ecx]
mov eax, ebx
cmp ecx, 0x10
jae 0x4092be
lea eax, [esp + 0x84]
lea edi, [eax + edx]
test edi, edi
je 0x4092eb
mov eax, ebx
cmp ecx, 0x10
jae 0x4092d3
lea eax, [esp + 0x84]
cmp eax, edi
ja 0x4092eb
mov eax, ebx
cmp ecx, 0x10
jae 0x4092e5
lea eax, [esp + 0x84]
add eax, edx
cmp edi, eax
jbe 0x4092f0
call fcn.0040ba51
cmp esi, 0xfffffffc
je 0x409309
test esi, esi
je 0x409304
lea ecx, [esp + 0x80]
cmp esi, ecx
je 0x409309
call fcn.0040ba51
cmp dword [esp + 0x58], edi
je 0x4093a8
cmp esi, 0xfffffffc
je 0x40934b
test esi, esi
jne 0x409321
call fcn.0040ba51
cmp dword [esi + 0x18], 0x10
jb 0x409338
mov eax, dword [esi + 4]
jmp 0x40933b
lea edi, [esp + 0x84]
jmp 0x40925b
lea eax, [esi + 4]
mov edx, dword [esi + 0x14]
add edx, eax
cmp dword [esp + 0x58], edx
jb 0x40934b
call fcn.0040ba51
mov eax, dword [esp + 0x58]
mov byte [eax], 0
cmp esi, 0xfffffffc
je 0x40937e
test esi, esi
jne 0x409360
call fcn.0040ba51
cmp dword [esi + 0x18], 0x10
jb 0x40936b
mov eax, dword [esi + 4]
jmp 0x40936e
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp dword [esp + 0x58], ecx
jb 0x40937e
call fcn.0040ba51
fld dword [0x41f900]
inc dword [esp + 0x58]
mov ecx, dword [esp + 0x98]
fstp dword [0x425d30]
mov edx, dword [esp + 0x94]
mov ebx, dword [esp + 0x84]
jmp 0x4092b0
push 0x7e
push 0x424be0
call fcn.00401c30
mov dx, word [esp + 0x50]
mov esi, eax
movsx eax, dx
xor ebx, ebx
push ebx
mov ecx, 0x36f5e34f
sub ecx, eax
push ebx
lea edx, [esp + 0x90]
mov dword [esp + 0x20], ecx
push edx
lea eax, [esp + 0xb0]
fild dword [esp + 0x24]
push esi
push eax
fstp qword [esp + 0x68]
call fcn.00408560
push 0x7e
push ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x34], ebx
push esi
call fcn.0040b840
push esi
call fcn.0040b25e
push 0xc
push 0x4231c0
call fcn.00401c30
mov cx, word [0x4230bc]
movsx edx, cx
mov dword [esp + 0x44], edx
mov esi, eax
add esp, 0x34
fild dword [esp + 0x10]
fadd qword [esp + 0x74]
mov eax, dword [esp + 0x2c]
dec dword [esp + 0x2c]
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fsubp st(1)
fcomp qword [0x41f8f8]
fnstsw ax
test ah, 5
jp 0x409456
mov ecx, dword [esp + 0x20]
imul ecx, ecx, 0x313159b0
mov dword [esp + 0x20], ecx
mov eax, esi
lea edx, [eax + 1]
jmp 0x409460
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409460
sub eax, edx
push eax
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0x8c]
call fcn.00404be0
mov edi, eax
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esp + 0x10], ebx
push esi
mov dword [esp + 0x14], ebx
mov dword [esi + 8], eax
call fcn.0040b25e
mov edx, dword [esp + 0x98]
add edx, 0xfffffff5
add esp, 4
cmp edi, edx
je 0x4094b9
mov eax, dword [esp + 0x3c]
inc eax
mov dword [esp + 0x3c], eax
cmp eax, dword [esp + 0x14]
jne 0x409050
jmp 0x4094d0
push 0xb
push edi
lea ecx, [esp + 0x88]
call fcn.00406840
mov dword [esp + 0x30], 1
mov ebx, dword [esp + 0x40]
mov edi, dword [esp + 0x60]
xor esi, esi
push 0x408
push esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x1c], esi
push edi
call fcn.0040b840
push edi
call fcn.0040b25e
mov edi, 1
add dword [esp + 0x34], edi
mov eax, dword [0x4231dc]
mov ecx, dword [esp + 0x34]
add eax, 0x569c7cf4
add esp, 0x10
cmp eax, ecx
jl 0x40953f
dec word [0x425d08]
mov dx, word [0x425d08]
mov cx, word [0x4246fc]
movsx eax, dx
movsx edx, cx
sub edx, eax
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fmul dword [esp + 0x64]
fstp dword [esp + 0x64]
xor eax, eax
mov dword [ebx], eax
mov dword [ebx + 4], eax
mov dword [ebx + 8], eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x14], esi
push ebx
mov byte [ebx + 0xc], al
call fcn.0040b25e
fld qword [0x424bc0]
fcomp qword [0x41f8f0]
add esp, 4
fnstsw ax
test ah, 5
jp 0x409591
add word [str.x5_k], di
mov ax, word [str.x5_k]
mov ecx, dword [0x4232f4]
cwde
lea edx, [ecx + eax + 0x1b0e3bde]
mov dword [esp + 0x24], edx
jmp 0x4095ab
mov eax, dword [0x42308c]
mov ecx, dword [esp + 0x20]
lea edx, [ecx + eax - 0x42e087e1]
mov dword [esp + 0x20], edx
dec dword [0x42308c]
mov edi, dword [esp + 0x68]
push 0x31e
push esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x1c], esi
push edi
call fcn.0040b840
push edi
call fcn.0040b25e
mov edi, dword [esp + 0x6c]
push 0xaf1
push esi
mov dword [esp + 0x2c], esi
push edi
mov dword [esp + 0x30], esi
call fcn.0040b840
push edi
call fcn.0040b25e
push 0x40
lea eax, [esp + 0xc0]
push esi
push eax
call fcn.0040b840
add esp, 0x2c
cmp dword [esp + 0x30], esi
je 0x4097f3
mov ecx, dword [esp + 0x7c]
push 0x708
push ecx
call fcn.00402bf0
add esp, 8
cmp dword [esp + 0x94], 0x200
jbe 0x4097f3
push 0x370
call fcn.0040b33b
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.00402c90
inc dword [esp + 0x2c]
fld qword [esp + 0x54]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
sub edx, eax
mov dword [esp + 0x1c], edx
fild dword [esp + 0x1c]
push 3
push 0x4233a0
fsubp st(1)
fstp qword [esp + 0x5c]
call fcn.00401c30
mov esi, eax
push esi
push ebx
call fcn.0040bec8
mov edi, eax
xor eax, eax
mov dword [esp + 0x2c], eax
mov word [esi], ax
mov dword [esp + 0x2c], eax
push esi
mov byte [esi + 2], al
call fcn.0040b25e
fld qword [esp + 0x68]
fsub qword [0x41f8e8]
mov eax, dword [esp + 0xa0]
add esp, 0x1c
cmp dword [esp + 0x98], 0x10
fstp qword [esp + 0x4c]
jae 0x4096c5
lea eax, [esp + 0x84]
mov ecx, dword [esp + 0x94]
push edi
push 1
push ecx
push eax
call fcn.0040bd82
mov edx, dword [esp + 0x34]
mov dword [esp + 0x24], edx
fild dword [esp + 0x24]
push edi
fmul qword [0x423310]
fstp qword [0x423310]
call fcn.0040bba4
add esp, 0x14
push 0x104
lea eax, [ebx + 0x104]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x15
push 0x4233f0
call fcn.00401c30
push 0x20
push 0x425d68
mov edi, eax
call fcn.00401c30
mov esi, eax
mov eax, dword [0x4276a0]
push eax
push esi
lea eax, [ebx + 0x104]
push eax
push edi
lea eax, [ebx + 0x208]
push 0x168
push eax
call fcn.0040c1f9
xor eax, eax
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 [esp + 0x3c], eax
mov dword [esi + 0x18], eax
mov dword [esp + 0x3c], eax
push esi
mov dword [esi + 0x1c], eax
call fcn.0040b25e
xor eax, eax
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
xor esi, esi
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], eax
mov dword [esp + 0x40], esi
push edi
mov dword [esp + 0x44], esi
mov byte [edi + 0x14], al
call fcn.0040b25e
mov ecx, dword [0x4276a0]
mov edi, 1
push edi
push ecx
call fcn.004011a0
lea eax, [ebx + 0x208]
push eax
push ebx
call fcn.004010c0
add esp, 0x40
push 0x370
push esi
push ebx
call fcn.0040b840
push ebx
call fcn.0040b25e
add esp, 0x10
push 0x15f90
call dword [sym.imp.KERNEL32.dll_Sleep]
add dword [0x4237c0], edi
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x28]
mov ecx, dword [0x4237c0]
sub edx, eax
sub edx, ecx
mov dword [esp + 0x28], edx
add dword [esp + 0x28], edi
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [0x4276a0]
push 0
push edx
call fcn.004011a0
add esp, 8
test eax, eax
jne 0x408f36
mov eax, dword [0x4276a8]
mov ecx, dword [0x4271e4]
push eax
push ecx
call fcn.004010c0
jmp 0x408f33