Function at 0x5093ac
Capabilities:
Set current directory

Disassembly:
mov eax, 0x5ea2eb
call fcn.00594e8c
sub esp, 0x50
push esi
push edi
mov dword [ebp - 0x44], ecx
mov eax, dword [0x836b08]
inc eax
mov dword [0x836b08], eax
cmp dword [0x836b08], 0x3e8
jle 0x5093f9
movzx eax, byte [0x65a4f8]
test eax, eax
je 0x5093f9
movzx eax, byte [0x65aa75]
test eax, eax
jne 0x5093f9
mov byte [0x682ad0], 0
and dword [0x836b08], 0
mov ecx, dword [ebp - 0x44]
add ecx, 0x2ab368
call fcn.004dd911
cmp eax, dword [0x68359c]
jge 0x5095d8
mov eax, dword [0x6835c0]
or eax, dword [0x6835c4]
jne 0x5095d8
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x44]
mov eax, dword [eax + 0xc3560]
cmp eax, dword [ecx + 0xc355c]
jne 0x5095d8
mov eax, dword [ebp - 0x44]
movsx eax, word [eax + 0x86bf0]
mov ecx, dword [ebp - 0x44]
movsx ecx, word [ecx + 0x86bf2]
cmp eax, ecx
je 0x5095d8
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x48]
mov eax, dword [eax + 0x2462e8]
or eax, dword [ecx + 0x2462ec]
jne 0x5095d8
mov eax, dword [ebp - 0x44]
mov ax, word [eax + 0x86bf2]
add ax, 1
mov ecx, dword [ebp - 0x44]
mov word [ecx + 0x86bf2], ax
mov eax, dword [ebp - 0x44]
movsx eax, word [eax + 0x86bf2]
and eax, 0xfff
mov ecx, dword [ebp - 0x44]
mov word [ecx + 0x86bf2], ax
mov eax, dword [ebp - 0x44]
movsx eax, word [eax + 0x86bf2]
mov ecx, dword [ebp - 0x44]
movsx eax, word [ecx + eax*2 + 0x84bf0]
push eax
mov ecx, dword [ebp - 0x44]
add ecx, 0x2ab368
call fcn.004dabd1
mov eax, dword [ebp - 0x44]
movsx eax, word [eax + 0x86bf2]
mov ecx, dword [ebp - 0x44]
lea eax, [ecx + eax*4 + 0x80bf0]
push eax
lea ecx, [ebp - 0x18]
call fcn.0040b108
and dword [ebp - 4], 0
push 0x50
lea ecx, [ebp - 0x18]
call fcn.0041d7d9
push eax
call fcn.004a1e7d
pop ecx
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x5095c7
cmp dword [ebp - 0x14], 2
je 0x5095c7
cmp dword [ebp - 0x14], 1
je 0x5095c7
push str.__Block_
lea ecx, [ebp - 0x1c]
call fcn.0040e04b
mov byte [ebp - 4], 1
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x14]
call dword [0x683c84]
pop ecx
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00416c78
add esp, 0xc
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x50], eax
mov byte [ebp - 4], 2
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x50]
lea eax, [ebp - 0x40]
push eax
call fcn.0041d645
add esp, 0xc
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x58], eax
mov byte [ebp - 4], 3
push dword [ebp - 0x58]
mov ecx, dword [ebp - 0x44]
add ecx, 0x11bb0c
call fcn.0040b132
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x40]
call fcn.0040b121
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x3c]
call fcn.0040b121
and dword [0x6834d4], 0
mov eax, dword [ebp - 0x44]
mov byte [eax + 0x2ed848], 1
mov eax, dword [ebp - 0x44]
mov byte [eax + 0x2a2759], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1c]
call fcn.0040b121
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.0040b121
jmp 0x5093f9
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x44]
mov eax, dword [eax + 0xc3560]
cmp eax, dword [ecx + 0xc355c]
jne 0x5095f4
mov ecx, dword [ebp - 0x44]
call fcn.00503986
mov eax, dword [ebp - 0x44]
movzx eax, byte [eax + 0x11bb1c]
test eax, eax
jne 0x50960f
mov eax, dword [0x682a7c]
cmp eax, dword [0x682a78]
je 0x50963e
mov eax, dword [0x683868]
movzx eax, byte [eax + 0x20b30]
test eax, eax
je 0x50963e
mov eax, dword [0x682a78]
imul eax, eax, 0x28
mov eax, dword [eax + 0x65aa94]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x50963e
mov eax, dword [ebp - 0x20]
mov dword [0x6834dc], eax
mov ecx, dword [ebp - 0x44]
call fcn.0050f07a
mov byte [ebp - 0xd], 1
mov eax, dword [0x683868]
movzx eax, byte [eax + 0x20b30]
test eax, eax
jne 0x509668
mov eax, dword [0x68385c]
mov al, byte [eax + 0x2461d0]
mov byte [ebp - 0xd], al
movzx eax, byte [0x6835ae]
test eax, eax
je 0x50967d
mov eax, dword [0x6834e0]
mov dword [0x6834dc], eax
mov ecx, dword [ebp - 0x44]
add ecx, 0x2ab368
call fcn.004dd911
test eax, eax
jne 0x5096ce
mov eax, dword [0x682a7c]
cmp eax, dword [0x682a78]
jne 0x5096ce
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x44]
mov eax, dword [eax + 0xc3560]
cmp eax, dword [ecx + 0xc355c]
jne 0x5096ce
mov eax, dword [ebp - 0x44]
movzx eax, byte [eax + 0xc3bd5]
test eax, eax
je 0x5096ce
movzx eax, byte [ebp - 0xd]
test eax, eax
je 0x5096ce
mov ecx, dword [ebp - 0x44]
call fcn.004ffdb5
mov ecx, dword [ebp - 0x44]
add ecx, 0x2ab368
call fcn.004dd911
test eax, eax
jne 0x50971f
mov eax, dword [0x682a7c]
cmp eax, dword [0x682a78]
jne 0x50971f
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x44]
mov eax, dword [eax + 0xc3560]
cmp eax, dword [ecx + 0xc355c]
jne 0x50971f
mov eax, dword [ebp - 0x44]
movzx eax, byte [eax + 0xc3bd6]
test eax, eax
je 0x50971f
movzx eax, byte [ebp - 0xd]
test eax, eax
je 0x50971f
mov ecx, dword [ebp - 0x44]
call fcn.00500140
mov ecx, dword [ebp - 0x44]
add ecx, 0x2ab368
call fcn.004dd911
test eax, eax
jne 0x50977b
mov eax, dword [0x682a7c]
cmp eax, dword [0x682a78]
jne 0x50977b
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x44]
mov eax, dword [eax + 0xc3560]
cmp eax, dword [ecx + 0xc355c]
jne 0x50977b
mov eax, dword [ebp - 0x44]
movzx eax, byte [eax + 0xc3630]
test eax, eax
je 0x50977b
movzx eax, byte [ebp - 0xd]
test eax, eax
je 0x50977b
push str.Press_CycleStart_after_Tool_Change
mov ecx, dword [ebp - 0x44]
add ecx, 0x11bb0c
call fcn.0040b14b
mov eax, dword [ebp - 0x44]
movzx eax, byte [eax + 0x11bb1c]
test eax, eax
je 0x509df2
mov eax, dword [0x682a7c]
cmp eax, dword [0x682a78]
jne 0x509df2
mov eax, dword [ebp - 0x44]
movzx eax, byte [eax + 0xc3630]
test eax, eax
jne 0x509df2
mov ecx, dword [ebp - 0x44]
add ecx, 0x2ab368
call fcn.004dd911
test eax, eax
jne 0x509df2
mov eax, dword [0x6835c0]
or eax, dword [0x6835c4]
jne 0x509df2
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x44]
mov eax, dword [eax + 0xc3560]
cmp eax, dword [ecx + 0xc355c]
jne 0x509df2
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x5c]
mov eax, dword [eax + 0x2462e8]
or eax, dword [ecx + 0x2462ec]
jne 0x509df2
movzx eax, byte [ebp - 0xd]
test eax, eax
je 0x509df2
cmp dword [0x6834c4], 0
jne 0x509df2
mov eax, dword [ebp - 0x44]
movzx eax, byte [eax + 0x24630a]
test eax, eax
jne 0x509df2
movzx eax, byte [0x6a5c41]
test eax, eax
je 0x50985f
movzx eax, byte [0x683457]
test eax, eax
jne 0x50985f
mov dword [0x6835c8], 0xa
mov byte [0x683457], 1
movzx eax, byte [0x6a5c40]
test eax, eax
je 0x50989a
mov eax, dword [ebp - 0x44]
movzx eax, byte [eax + 0x11bb59]
test eax, eax
jne 0x50989a
and dword [ebp - 0x24], 0
jmp 0x509885
mov eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0x1e
jge 0x50989a
mov eax, dword [ebp - 0x24]
imul eax, eax, 5
mov byte [eax + 0x6830bc], 0
jmp 0x50987e
mov eax, dword [ebp - 0x44]
mov byte [eax + 0x11bb1c], 0
mov eax, dword [ebp - 0x44]
movzx eax, byte [eax + 0x11bb59]
test eax, eax
jne 0x5098c6
movzx eax, byte [0x6835ae]
test eax, eax
je 0x5098f2
cmp dword [0x6835ec], 0
jne 0x5098f2
mov eax, dword [ebp - 0x44]
fld qword [eax + 0x11f070]
fstp qword [0x6a5be8]
mov eax, dword [ebp - 0x44]
fld qword [eax + 0x11f078]
fstp qword [0x6a5be0]
mov eax, dword [ebp - 0x44]
mov eax, dword [eax + 0x11f080]
mov dword [0x6a5bbc], eax
mov eax, dword [ebp - 0x44]
movzx eax, byte [eax + 0x2ed3f1]
test eax, eax
je 0x509908
mov ecx, dword [ebp - 0x44]
call fcn.004fe4df
mov eax, dword [ebp - 0x44]
mov byte [eax + 0x11f868], 0
mov eax, dword [ebp - 0x44]
movzx eax, byte [eax + 0x11bb59]
test eax, eax
je 0x509c74
mov eax, dword [ebp - 0x44]
mov byte [eax + 0x2a0726], 1
mov eax, dword [ebp - 0x44]
mov byte [eax + 0x11bb59], 0
mov eax, dword [ebp - 0x44]
movzx eax, byte [eax + 0xc35fc]
test eax, eax
je 0x509965
mov ecx, dword [ebp - 0x44]
add ecx, 0xc35ec
mov eax, dword [ebp - 0x44]
mov eax, dword [eax + 0xc35ec]
call dword [eax + 0x4c]
mov eax, dword [ebp - 0x44]
mov byte [eax + 0xc35fc], 0
mov eax, dword [ebp - 0x44]
movzx eax, byte [eax + 0x2a275a]
test eax, eax
je 0x5099ac
mov eax, dword [ebp - 0x44]
movzx eax, byte [eax + 0x2ed848]
test eax, eax
je 0x5099ac
mov eax, dword [ebp - 0x44]
cmp dword [eax + 0x2ed83c], 0xffffffff
je 0x5099a2
mov ecx, dword [ebp - 0x44]
add ecx, 0x2ed838
mov eax, dword [ebp - 0x44]
mov eax, dword [eax + 0x2ed838]
call dword [eax + 0x4c]
mov eax, dword [ebp - 0x44]
mov byte [eax + 0x2a275a], 0
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x44]
fld qword [ecx + 0x11dce0]
fstp qword [eax + 0x80b48]
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x44]
fld qword [ecx + 0x11dce8]
fstp qword [eax + 0x80b50]
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x44]
fld qword [ecx + 0x11dcf0]
fstp qword [eax + 0x80b58]
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x44]
fld qword [ecx + 0x11dcf8]
fstp qword [eax + 0x80b60]
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x44]
fld qword [ecx + 0x11dd00]
fstp qword [eax + 0x80b68]
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x44]
fld qword [ecx + 0x11dd08]
fstp qword [eax + 0x80b70]
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x44]
fld qword [ecx + 0x11dd10]
fstp qword [eax + 0x80b78]
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x44]
fld qword [ecx + 0x11dd18]
fstp qword [eax + 0x80b80]
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x44]
fld qword [ecx + 0x11dd20]
fstp qword [eax + 0x80b88]
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x44]
fld qword [ecx + 0x11dd28]
fstp qword [eax + 0x80b90]
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x44]
fld qword [ecx + 0x11dd30]
fstp qword [eax + 0x80b98]
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x44]
fld qword [ecx + 0x11dd38]
fstp qword [eax + 0x80ba0]
mov eax, dword [ebp - 0x44]
mov ecx, dword [0x688344]
mov dword [eax + 0x80b40], ecx
mov ecx, dword [0x68385c]
add ecx, 0x80bbc
call fcn.00517034
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea ecx, [ebp - 0x34]
call fcn.005bee57
mov dword [ebp - 4], 4
push 0
push 0x1001
push str.RunData.dat
lea ecx, [ebp - 0x34]
call fcn.005bf19f
cmp eax, 1
jne 0x509aee
push 0x68
mov eax, dword [ebp - 0x44]
add eax, 0x80b40
push eax
lea ecx, [ebp - 0x34]
call fcn.005bebaa
lea ecx, [ebp - 0x34]
call fcn.005bedf5
mov eax, dword [ebp - 0x44]
mov byte [eax + 0xc35fc], 0
mov eax, dword [ebp - 0x44]
mov byte [eax + 0x11dd60], 0
mov eax, dword [ebp - 0x44]
movzx eax, byte [eax + 0x11cd41]
cmp eax, 1
jne 0x509bb5
movzx eax, byte [0x6a87f8]
test eax, eax
je 0x509b8d
mov eax, dword [ebp - 0x44]
movzx eax, byte [eax + 0x2ed848]
test eax, eax
jne 0x509b8d
cmp dword [0x688220], 1
je 0x509b8d
mov eax, dword [ebp - 0x44]
mov byte [eax + 0x11cd82], 1
mov eax, dword [ebp - 0x44]
mov byte [eax + 0x2a2759], 1
mov byte [0x6a5c49], 0
mov eax, dword [ebp - 0x44]
mov byte [eax + 0x11bb59], 1
mov eax, dword [ebp - 0x44]
mov byte [eax + 0x2ed848], 1
and dword [0x6834e0], 0
and dword [0x6834dc], 0
mov ecx, dword [ebp - 0x44]
call fcn.005061f1
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x34]
call fcn.005bee96
jmp 0x509dfa
mov eax, dword [ebp - 0x44]
mov eax, dword [eax + 0x11cd44]
mov dword [0x6834e0], eax
mov eax, dword [ebp - 0x44]
mov eax, dword [eax + 0x11cd44]
mov dword [0x6834dc], eax
mov eax, dword [ebp - 0x44]
mov byte [eax + 0x11cd41], 0
jmp 0x509bbd
mov ecx, dword [ebp - 0x44]
call fcn.00507f2f
movzx eax, byte [0x6a87f8]
test eax, eax
je 0x509c2d
mov eax, dword [ebp - 0x44]
movzx eax, byte [eax + 0x2ed848]
test eax, eax
jne 0x509c2d
cmp dword [0x688220], 1
je 0x509c2d
mov eax, dword [ebp - 0x44]
mov byte [eax + 0x11cd82], 1
mov eax, dword [ebp - 0x44]
mov byte [eax + 0x2a2759], 1
mov byte [0x6a5c49], 0
mov eax, dword [ebp - 0x44]
mov byte [eax + 0x11bb59], 1
mov eax, dword [ebp - 0x44]
mov byte [eax + 0x2ed848], 1
and dword [0x6834e0], 0
and dword [0x6834dc], 0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x34]
call fcn.005bee96
jmp 0x509dfa
mov edi, 0x687d78
mov esi, 0x7e4958
mov ecx, 0x82a2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x44]
mov byte [eax + 0x11cd41], 0
mov eax, dword [ebp - 0x44]
mov byte [eax + 0x11bb60], 1
mov eax, dword [ebp - 0x44]
fld qword [eax + 0x11dd58]
fstp qword [0x688230]
and dword [0x6881d8], 0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x34]
call fcn.005bee96
mov eax, dword [ebp - 0x44]
movzx eax, byte [eax + 0xc3c20]
test eax, eax
je 0x509ca1
mov ecx, dword [ebp - 0x44]
add ecx, 0xc3c24
mov eax, dword [ebp - 0x44]
mov eax, dword [eax + 0xc3c24]
call dword [eax + 0x4c]
mov eax, dword [ebp - 0x44]
mov byte [eax + 0xc3c20], 0
movzx eax, byte [0x6835ae]
test eax, eax
je 0x509da8
mov byte [0x6835ae], 0
mov eax, dword [0x6835f4]
mov dword [0x68359c], eax
mov eax, dword [ebp - 0x44]
mov byte [eax + 0x11bb34], 1
mov eax, dword [0x6835f4]
mov dword [0x68359c], eax
and dword [0x6834d4], 0
cmp dword [0x6835ec], 0
jne 0x509d0b
mov al, byte [0x6a5c49]
mov byte [ebp - 0x35], al
mov edi, 0x687d78
mov esi, 0x7c3eb0
mov ecx, 0x82a2
rep movsd dword es:[edi], dword [esi]
mov al, byte [ebp - 0x35]
mov byte [0x6a5c49], al
jmp 0x509d92
fld qword [0x682a88]
fsub qword [0x6a5be8]
mov eax, dword [ebp - 0x44]
fstp qword [eax + 0xc3ae8]
mov eax, dword [ebp - 0x44]
fld qword [0x682a90]
fstp qword [eax + 0xc3af0]
fld qword [0x682a98]
fsub qword [0x6a5be0]
mov eax, dword [ebp - 0x44]
fstp qword [eax + 0xc3af8]
mov eax, dword [ebp - 0x44]
fld qword [0x682aa0]
fstp qword [eax + 0xc3b00]
mov eax, dword [ebp - 0x44]
fld qword [0x682aa8]
fstp qword [eax + 0xc3b08]
mov eax, dword [ebp - 0x44]
fld qword [0x682ab0]
fstp qword [eax + 0xc3b10]
mov eax, dword [ebp - 0x44]
mov byte [eax + 0xc3ae0], 1
mov eax, dword [0x6834e0]
mov dword [0x6834dc], eax
push str._Press_CycleStart_for_preparation_move._Check_Spindle
mov ecx, dword [ebp - 0x44]
call fcn.004ef240
mov eax, dword [ebp - 0x44]
mov ecx, dword [0x688450]
mov dword [eax + 0x11e038], ecx
and dword [0x6835ec], 0
mov byte [0x682abe], 1
and dword [0x6834d4], 0
movzx eax, byte [0x6a5c49]
test eax, eax
je 0x509dcb
mov ecx, dword [ebp - 0x44]
call fcn.00507f2f
jmp 0x509de9
mov eax, dword [ebp - 0x44]
fld qword [eax + 0x11e020]
fcomp qword [0x5f0c80]
fnstsw ax
test ah, 0x41
jne 0x509de9
mov ecx, dword [ebp - 0x44]
call fcn.00507f2f
mov byte [0x836570], 0
jmp 0x509dfa
mov ecx, dword [ebp - 0x44]
call fcn.005032cb
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
leave
ret