Function at 0x403040
Capabilities:
Set current directory

Disassembly:
sub esp, 0x884
mov eax, dword [0x42aab0]
xor eax, esp
mov dword [esp + 0x880], eax
push ebp
push esi
push edi
push str.__PowerCinema___WinMain__in
call fcn.004011b0
add esp, 4
lea ecx, [esp + 0x18]
call fcn.00402d40
mov ecx, dword [0x42df7c]
mov edx, dword [0x42df78]
lea eax, [esp + 0x18]
push eax
push ecx
push edx
call fcn.00402e50
mov ebp, 4
add esp, 0xc
cmp dword [0x42df78], ebp
jne 0x403109
mov eax, dword [0x42df7c]
mov eax, dword [eax + 8]
mov edi, str.PhotoArrival
mov esi, eax
mov ecx, 0xd
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x4030e5
mov edi, str.VideoArrival
mov esi, eax
mov ecx, 0xd
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x4030e5
mov edi, str.MusicArrival
mov esi, eax
mov ecx, 0xd
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x4030e5
mov esi, eax
mov edi, str.MixedArrival
mov ecx, 0xd
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x403132
call fcn.00402950
test eax, eax
je 0x403109
push str._PowerCinema___WinMain__ArcadeMovie_is_launched._Dont_launch_PCM_application.__n
call fcn.004011b0
add esp, 4
lea ecx, [esp + 0x18]
call fcn.00402da0
jmp 0x403b0b
cmp dword [0x42df78], 2
jne 0x403132
mov ecx, dword [0x42df7c]
mov esi, dword [ecx + 4]
mov edi, str.PreLaunch
mov ecx, 0xa
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x403132
push str.__PowerCinema___WinMain__PreLaunch
jmp 0x4030f3
push ebx
push str.Koan
lea ecx, [esp + 0x14]
call fcn.00401cf0
push 0xfe
lea eax, [esp + 0x56]
push 0
push eax
mov word [esp + 0x5c], 0
call fcn.0040ef80
mov ecx, 9
mov esi, str.6A1F6D16_7994_4c6d_9251_11BFB2A4A958
lea edi, [esp + 0x15c]
rep movsd dword es:[edi], dword [esi]
add esp, 0xc
push 0
push 0
movsw word es:[edi], word [esi]
push 0x422c38
lea ecx, [esp + 0x15c]
push ecx
lea ecx, [esp + 0x38]
movsb byte es:[edi], byte [esi]
call fcn.00401db0
mov bl, byte [esp + 0x1c]
test bl, 2
je 0x4031a3
mov edx, dword [esp + 0x24]
push edx
lea ecx, [esp + 0x2c]
call fcn.00402ad0
test bl, 1
je 0x4031b6
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x14]
call fcn.00401bd0
cmp dword [esp + 0x2c], 0xb7
jne 0x40371f
push str.__PowerCinema___WinMain__Another_Instance_Running_n
call fcn.004011b0
mov ecx, dword [esp + 0x14]
add esp, 4
push 0
push ecx
call dword [sym.imp.USER32.dll_FindWindowA]
mov edx, eax
test edx, edx
mov dword [esp + 0x18], edx
jne 0x4031f7
push str.Cannot_find_PCM_instance
call fcn.004011b0
add esp, 4
jmp 0x403267
cmp dword [0x42df78], ebp
jne 0x40325e
mov eax, dword [0x42df7c]
mov eax, dword [eax + 8]
mov edi, str.PhotoArrival
mov esi, eax
mov ecx, 0xd
xor ebx, ebx
repe cmpsb byte [esi], byte es:[edi]
je 0x40324f
mov edi, str.VideoArrival
mov esi, eax
mov ecx, 0xd
xor ebx, ebx
repe cmpsb byte [esi], byte es:[edi]
je 0x40324f
mov edi, str.MusicArrival
mov esi, eax
mov ecx, 0xd
xor ebx, ebx
repe cmpsb byte [esi], byte es:[edi]
je 0x40324f
mov esi, eax
mov edi, str.MixedArrival
mov ecx, 0xd
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x40325e
push str.__PowerCinema___WinMain__AutoPlay_by_drive_arrival_with_content__do_not_restore_window_n
call fcn.004011b0
add esp, 4
jmp 0x403267
push 9
push edx
call dword [sym.imp.USER32.dll_ShowWindow]
mov edx, dword [0x42df78]
cmp edx, 1
mov ebp, dword [0x42df7c]
jle 0x4036ab
mov eax, dword [ebp + 4]
mov edi, str.AUTOPLAY
mov esi, eax
mov ecx, 9
xor ebx, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4033c0
mov edx, eax
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x403297
lea edi, [esp + 0x50]
sub eax, edx
add edi, 0xffffffff
lea esp, [esp]
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x4032b0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x50]
add edi, 0xffffffff
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x4032d1
mov bx, word [0x422fdc]
mov word [edi], bx
mov eax, dword [ebp + 8]
mov ecx, eax
lea ebx, [ebx]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x4032f0
lea edi, [esp + 0x50]
sub eax, ecx
mov esi, ecx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x403304
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]
lea edi, [esp + 0x50]
add edi, 0xffffffff
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x403323
mov word [edi], bx
mov eax, dword [ebp + 0xc]
mov ecx, eax
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x403335
lea edi, [esp + 0x50]
sub eax, ecx
mov esi, ecx
add edi, 0xffffffff
lea esp, [esp]
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x403350
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]
lea ecx, [esp + 0x50]
push ecx
push str._PowerCinema___WinMain__Special_Command:__s_n
call fcn.004011b0
mov edx, dword [esp + 0x18]
push edx
lea eax, [esp + 0x5c]
push eax
call fcn.004028d0
add esp, 0x10
lea ecx, [esp + 0x28]
call fcn.00402ba0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4033b2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x1c]
call fcn.00402da0
jmp 0x403b0a
mov edi, str.SHORTCUT
mov esi, eax
mov ecx, 9
xor ebx, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4034a9
mov edx, eax
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4033d8
lea edi, [esp + 0x50]
sub eax, edx
add edi, 0xffffffff
lea ebx, [ebx]
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x4033f0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x50]
add edi, 0xffffffff
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x403411
mov cx, word [0x422fdc]
mov word [edi], cx
mov eax, dword [ebp + 8]
mov ecx, eax
lea ebx, [ebx]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x403430
lea edi, [esp + 0x50]
sub eax, ecx
mov esi, ecx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x403444
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
lea edx, [esp + 0x50]
mov ecx, eax
push edx
and ecx, 3
push str._PowerCinema___WinMain__Special_Command:__s_n
rep movsb byte es:[edi], byte [esi]
call fcn.004011b0
mov eax, 0x402c00
add esp, 8
test eax, eax
jne 0x403489
mov ecx, dword [esp + 0x10]
push ecx
lea edx, [esp + 0x54]
push edx
call fcn.004028d0
add esp, 8
lea ecx, [esp + 0x28]
call fcn.00402ba0
lea ecx, [esp + 0x10]
call fcn.00401760
lea ecx, [esp + 0x1c]
call fcn.00402da0
jmp 0x403b0a
mov edi, str.REMOTE
mov esi, eax
mov ecx, 7
xor ebx, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4036ab
mov edx, eax
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4034c1
lea edi, [esp + 0x50]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x4034d3
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x50]
add edi, 0xffffffff
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x4034f4
mov ax, word [0x422fdc]
mov word [edi], ax
mov eax, dword [ebp + 8]
mov ecx, eax
lea esp, [esp]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x403510
lea edi, [esp + 0x50]
sub eax, ecx
mov esi, ecx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x403524
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]
lea ecx, [esp + 0x50]
push ecx
push str._PowerCinema___WinMain__Remote_Command:__s_n
call fcn.004011b0
push 0x102
lea edx, [esp + 0x38a]
push 0
push edx
mov word [esp + 0x390], 0
call fcn.0040ef80
mov eax, dword [0x42df7c]
mov eax, dword [eax + 8]
add esp, 0x14
mov ecx, eax
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x403576
lea edi, [esp + 0x37c]
sub eax, ecx
mov esi, ecx
add edi, 0xffffffff
lea ecx, [ecx]
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x403590
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 + 0x10]
push 0
push ecx
call dword [sym.imp.USER32.dll_FindWindowA]
test eax, eax
jne 0x4035cb
push str._PowerCinema___WinMain__Cannot_find_PCM_instance
call fcn.004011b0
add esp, 4
jmp 0x403489
movzx ecx, byte [0x422f34]
mov eax, dword [0x422f30]
mov edx, dword [str.MY_MUSIC]
mov byte [esp + 0x4c], cl
movzx ecx, byte [0x422f2a]
mov dword [esp + 0x48], eax
mov ax, word [0x422f28]
mov dword [esp + 0x44], edx
mov edx, dword [str.MY_DVD]
mov word [esp + 0x40], ax
mov byte [esp + 0x42], cl
mov dword [esp + 0x3c], edx
lea ecx, [esp + 0x44]
lea eax, [esp + 0x37c]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x403634
test dl, dl
je 0x403630
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x403634
add eax, 2
add ecx, 2
test dl, dl
jne 0x403614
xor eax, eax
jmp 0x403639
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x403658
mov edx, dword [esp + 0x18]
push eax
push 0x2717
push 0xc500
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x403489
lea ecx, [esp + 0x3c]
lea eax, [esp + 0x37c]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x403683
test dl, dl
je 0x40367f
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x403683
add eax, 2
add ecx, 2
test dl, dl
jne 0x403663
xor eax, eax
jmp 0x403688
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x403489
push eax
mov eax, dword [esp + 0x1c]
push 0x2723
push 0xc500
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x403489
mov esi, 1
cmp edx, esi
jle 0x4036f7
jmp 0x4036c6
mov ebp, dword [0x42df7c]
mov ecx, dword [ebp + esi*4]
push ecx
push esi
push str.__PowerCinema___WinMain__Command__d__s_n
call fcn.004011b0
mov edx, dword [esp + 0x1c]
mov eax, dword [0x42df7c]
mov ecx, dword [eax + esi*4]
push edx
push ecx
call fcn.004028d0
add esi, 1
add esp, 0x14
cmp esi, dword [0x42df78]
jl 0x4036c0
mov eax, dword [esp + 0x30]
test eax, eax
je 0x403706
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x403abe
cmp dword [0x42df78], ebp
jne 0x403787
mov ecx, dword [0x42df7c]
mov eax, dword [ecx + 8]
mov edi, str.PhotoArrival
mov esi, eax
mov ecx, 0xd
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x403778
mov edi, str.VideoArrival
mov esi, eax
mov ecx, 0xd
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x403778
mov edi, str.MusicArrival
mov esi, eax
mov ecx, 0xd
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x403778
mov esi, eax
mov edi, str.MixedArrival
mov ecx, 0xd
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x403787
push str.__PowerCinema___WinMain__AutoPlay_by_drive_arrival_with_content__do_not_show_animation_n
call fcn.004011b0
add esp, 4
jmp 0x40378c
call fcn.004029c0
xor ebx, ebx
xor edi, edi
cmp dword [esp + 0x34], edi
setne bl
cmp ebx, edi
je 0x4037a2
push str.IsAnotherInstanceRunningOnOtherSession__TRUE
jmp 0x4037a7
push str.IsAnotherInstanceRunningOnOtherSession__FALSE
call fcn.004011b0
add esp, 4
push 0xff
lea ecx, [esp + 0x281]
push edi
push ecx
mov byte [esp + 0x20], 0
mov word [esp + 0x21], di
mov byte [esp + 0x288], 0
call fcn.0040ef80
push 0x103
lea edx, [esp + 0x595]
push edi
push edx
mov byte [esp + 0x59c], 0
call fcn.0040ef80
push 0x103
lea eax, [esp + 0x195]
push edi
push eax
mov byte [esp + 0x19c], 0
call fcn.0040ef80
add esp, 0x24
push 0x104
lea ecx, [esp + 0x588]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push edi
push edi
lea edx, [esp + 0x284]
push edx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x594]
push ecx
call fcn.0040ef2a
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
lea edx, [esp + 0x290]
push edx
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x194]
push str._s_s
push ecx
call esi
add esp, 0x24
lea edx, [esp + 0x178]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x403883
lea eax, [esp + 0x178]
push eax
push str._PowerCinema___WinMain__Set_current_working_directory_successfully_:__s
jmp 0x403890
lea ecx, [esp + 0x178]
push ecx
push str._PowerCinema___WinMain__Set_current_working_directory_failed_:__s
call fcn.004011b0
add esp, 8
push 0x206
lea edx, [esp + 0x68e]
push edi
push edx
mov word [esp + 0x694], di
call fcn.0040ef80
add esp, 0xc
push 0x104
lea eax, [esp + 0x68c]
push eax
push 0xffffffffffffffff
lea ecx, [esp + 0x184]
push ecx
push edi
push edi
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push str.Presentation_version.kc
lea edx, [esp + 0x280]
push edx
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x48c]
push str._s_s_s
push ecx
call esi
add esp, 0x14
call fcn.004045ae
cmp eax, edi
jne 0x40390c
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
push str.koan_Python25.dll
lea ecx, [esp + 0x280]
push ecx
add eax, 0x10
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x24], eax
lea eax, [esp + 0x24]
push str._s_s_s
push eax
call fcn.00401cd0
mov ebp, dword [esp + 0x2c]
push ebp
push str._PowerCinema___WinMain__Init_python_path_:__s
call fcn.004011b0
push ebp
call fcn.00402320
add esp, 0x20
test al, al
je 0x403a71
push str.__main__
call dword [0x42c120]
mov esi, eax
push esi
call dword [0x42c124]
mov edi, eax
push edi
push esi
mov dword [esp + 0x4c], edi
call fcn.004020e0
add esp, 0x10
test ebx, ebx
je 0x4039f6
mov ebp, dword [0x42df78]
add ebp, 1
xor ecx, ecx
mov eax, ebp
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00403d22
mov ebx, eax
lea ecx, [ebp - 1]
add esp, 4
xor eax, eax
test ecx, ecx
jle 0x4039c7
mov edx, dword [0x42df7c]
mov edx, dword [edx + eax*4]
mov dword [ebx + eax*4], edx
add eax, 1
cmp eax, ecx
jl 0x4039b4
push 0x40
call fcn.00403d22
mov edi, eax
mov ecx, 7
mov esi, str.AnotherSessionInstanceExists
rep movsd dword es:[edi], dword [esi]
push ebx
movsb byte es:[edi], byte [esi]
push ebp
mov dword [ebx + ebp*4 - 4], eax
call dword [0x42c144]
mov ebp, dword [esp + 0x24]
mov edi, dword [esp + 0x48]
add esp, 0xc
jmp 0x403a0c
mov eax, dword [0x42df7c]
mov ecx, dword [0x42df78]
push eax
push ecx
call dword [0x42c144]
add esp, 8
lea edx, [esp + 0x480]
push edx
push str._PowerCinema___WinMain__version.kc_path_:__s_n
call fcn.004011b0
lea eax, [esp + 0x488]
push 0
push eax
call fcn.0040f93f
add esp, 0x10
test eax, eax
je 0x403a50
lea ecx, [esp + 0x480]
push ecx
push str._PowerCinema___s_not_exist_n
call fcn.004011b0
add esp, 8
call fcn.00402680
jmp 0x403a7f
mov edx, 0x402c00
test edx, edx
je 0x403a6a
lea eax, [esp + 0x480]
push edi
push eax
call fcn.004026a0
add esp, 8
call fcn.00402680
jmp 0x403a7f
push ebp
push str._PowerCinema__fail_to_init_Python_:__s_n
call fcn.004011b0
add esp, 8
lea eax, [ebp - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403a9b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x30]
test eax, eax
je 0x403aaa
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403aca
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403aea
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403b0a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
pop ebx
mov ecx, dword [esp + 0x88c]
pop edi
pop esi
pop ebp
xor ecx, esp
xor eax, eax
call fcn.0040d490
add esp, 0x884
ret 0x10