Function at 0x419af0
Capabilities:
Check mutex on windows
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4efb12
mov eax, dword fs:[0]
push eax
sub esp, 0x158
mov eax, dword [0x51d584]
xor eax, esp
mov dword [esp + 0x150], eax
push ebx
push esi
push edi
mov eax, dword [0x51d584]
xor eax, esp
push eax
lea eax, [esp + 0x168]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov esi, edx
xor ebx, ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x28], ecx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x170], ebx
lea ecx, [esp + 0x58]
mov dword [esp + 0x54], vtable.tpsp::TASKITEM.0
call fcn.004bccf0
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x88], ebx
mov dword [esp + 0x84], ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x8c], ebx
mov edi, 1
xor ecx, ecx
mov dword [esp + 0x170], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ecx
cmp dword [esi + 0x24], ebx
jle 0x419c4a
cmp ecx, dword [esi + 0x24]
jl 0x419bfe
push 0x265
push str.D:WorkCodeTPSPTpsp
push 3
lea ecx, [esp + 0x38]
mov byte [esp + 0x2f], bl
call fcn.00499b70
mov byte [esp + 0x170], 2
or dword [esp + 0x10], edi
push str.CHECK_failed:__index_____size___:
mov ecx, eax
call fcn.00499e60
push eax
lea ecx, [esp + 0x27]
call fcn.0049a0b0
mov dword [esp + 0x170], edi
test byte [esp + 0x10], 1
je 0x419c1a
and dword [esp + 0x10], 0xfffffffe
lea ecx, [esp + 0x2c]
call fcn.00499ba0
mov edx, dword [esi + 0x20]
mov eax, dword [esp + 0x1c]
mov eax, dword [edx + eax*4]
mov edi, dword [esp + 0x14]
push eax
call fcn.0041a770
test eax, eax
je 0x419ce7
mov ecx, dword [esp + 0x1c]
mov edi, 1
add ecx, edi
mov dword [esp + 0x1c], ecx
cmp ecx, dword [esi + 0x24]
jl 0x419bfe
mov ecx, dword [esi + 0x30]
xor eax, eax
push ecx
lea edx, [esp + 0x144]
push str.Tpsp_Charging_SingTask___d
push edx
mov byte [esp + 0x14c], bl
mov dword [esp + 0x14d], eax
mov dword [esp + 0x151], eax
mov dword [esp + 0x155], eax
mov dword [esp + 0x159], eax
mov dword [esp + 0x15d], eax
mov dword [esp + 0x161], eax
mov dword [esp + 0x165], eax
mov byte [esp + 0x169], al
call fcn.0048158f
add esp, 0xc
lea eax, [esp + 0x140]
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x419d30
cmp edi, ebx
je 0x419cce
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x54]
mov dword [esp + 0x170], 0xffffffff
call fcn.0042cae0
jmp 0x41a564
mov dword [esp + 0x54], vtable.tpsp::TASKITEM.0
lea ecx, [esp + 0x54]
mov dword [esp + 0x170], 5
cmp ecx, dword [0x52521c]
je 0x419d19
mov ecx, dword [esp + 0x80]
cmp ecx, ebx
je 0x419d19
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov ecx, dword [esp + 0x74]
push ecx
call fcn.00481b34
mov byte [esp + 0x174], 3
jmp 0x41a544
mov eax, dword [esi + 0x30]
mov edi, dword [esp + 0x14]
lea ecx, [esp + 0x54]
push ecx
push eax
call fcn.0041bc80
cmp eax, ebx
je 0x419d81
lea edx, [esp + 0x54]
mov dword [esp + 0x24], ebx
cmp esi, edx
je 0x419d6a
mov eax, dword [esp + 0x54]
mov ecx, edx
mov edx, dword [eax + 0xc]
call edx
mov ecx, dword [esp + 0x18]
lea esi, [esp + 0x54]
call fcn.0042d450
lea ebx, [esp + 0x54]
call fcn.004065f0
lea edi, [eax + 8]
call fcn.00420020
mov esi, dword [esp + 0x18]
xor ebx, ebx
mov eax, 0xf
mov dword [esp + 0xc4], eax
mov dword [esp + 0xc0], ebx
mov byte [esp + 0xb0], bl
mov dword [esp + 0xa8], eax
mov dword [esp + 0xa4], ebx
mov byte [esp + 0x94], bl
lea eax, [esp + 0x94]
push eax
lea edx, [esp + 0xb4]
mov ecx, esi
mov byte [esp + 0x174], 7
call fcn.0040c150
mov eax, esi
mov dword [esp + 0x1c], ebx
call fcn.004065d0
mov eax, dword [eax + 0xc]
cmp eax, ebx
jle 0x41a438
mov eax, dword [esp + 0x18]
call fcn.004065d0
mov esi, dword [esp + 0x1c]
lea edi, [eax + 8]
call fcn.0040d9e0
push eax
lea ecx, [esp + 0xd0]
push ecx
call fcn.0042e380
mov byte [esp + 0x170], 8
mov edx, dword [esp + 0x138]
shr edx, 0xa
test dl, 1
je 0x419f38
push str.kernel32
mov dword [esp + 0x14], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp eax, ebx
je 0x419e60
push str.IsWow64Process
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
cmp esi, ebx
je 0x419e55
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
mov edx, str.Win64
cmp dword [esp + 0x10], ebx
jne 0x419e65
mov edx, 0x50cabc
mov eax, edx
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x2c], bl
lea esi, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x419e80
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x34]
call fcn.00402a70
mov byte [esp + 0x170], 9
mov eax, dword [esp + 0x128]
call fcn.004207d0
mov edi, 0x10
test al, al
je 0x419f1b
mov eax, dword [esp + 0x2c]
cmp dword [esp + 0x40], edi
jae 0x419ebf
lea eax, [esp + 0x2c]
mov ecx, dword [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x12c]
push ebx
push eax
call fcn.004029b0
cmp eax, 0xffffffff
jne 0x419f1b
mov byte [esp + 0x170], 8
cmp dword [esp + 0x40], edi
jb 0x419ef2
mov edx, dword [esp + 0x2c]
push edx
call fcn.00480d64
add esp, 4
lea ecx, [esp + 0xcc]
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x2c], bl
mov byte [esp + 0x170], 7
call fcn.0042e450
jmp 0x41a41d
mov byte [esp + 0x170], 8
cmp dword [esp + 0x40], edi
jb 0x419f3d
mov eax, dword [esp + 0x2c]
push eax
call fcn.00480d64
add esp, 4
jmp 0x419f3d
mov edi, 0x10
mov ecx, dword [esp + 0x138]
shr ecx, 0xb
test cl, 1
je 0x419fd1
lea esi, [esp + 0x2c]
call fcn.0040f140
mov byte [esp + 0x170], 0xa
mov eax, dword [esp + 0x12c]
call fcn.004207d0
test al, al
je 0x419fb6
mov eax, dword [esp + 0x12c]
cmp dword [eax + 0x14], edi
jb 0x419f7f
mov eax, dword [eax]
push eax
call fcn.0040f3a0
add esp, 4
test al, al
jne 0x419fb6
lea ecx, [esp + 0x2c]
mov byte [esp + 0x170], 8
call fcn.00402fd0
lea ecx, [esp + 0xcc]
mov byte [esp + 0x170], 7
call fcn.0042e450
jmp 0x41a41d
mov byte [esp + 0x170], 8
cmp dword [esp + 0x40], edi
jb 0x419fd1
mov edx, dword [esp + 0x2c]
push edx
call fcn.00480d64
add esp, 4
mov eax, dword [esp + 0xdc]
cmp eax, ebx
jne 0x41a179
mov eax, dword [esp + 0x14]
push eax
lea ebx, [esp + 0xd0]
lea ecx, [esp + 0x58]
call fcn.004186a0
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0xdc]
xor esi, esi
cmp eax, esi
je 0x41a152
mov ecx, dword [ecx + 0x30]
push eax
mov eax, dword [esp + 0xdc]
push edx
push eax
push ecx
push str.TaskID__d__ResID__d_ResVer__d_failed___d__
call fcn.00406330
add esp, 0x14
push 5
mov edi, 0xf
push str.Break
lea ecx, [esp + 0x34]
mov dword [esp + 0x48], edi
mov dword [esp + 0x44], esi
mov byte [esp + 0x34], 0
call fcn.00402a70
lea ecx, [esp + 0x2c]
mov byte [esp + 0x170], 0xb
mov edx, dword [esp + 0xe4]
push ecx
push edx
call fcn.0040d200
add esp, 8
mov byte [esp + 0x170], 8
cmp dword [esp + 0x40], 0x10
mov bl, al
jb 0x41a082
mov eax, dword [esp + 0x2c]
push eax
call fcn.00480d64
add esp, 4
mov dword [esp + 0x40], edi
mov dword [esp + 0x3c], esi
mov byte [esp + 0x2c], 0
test bl, bl
je 0x41a407
mov ecx, dword [esp + 0x138]
shr ecx, 6
test cl, 1
je 0x41a0c6
mov ecx, dword [esp + 0xf4]
cmp ecx, esi
jne 0x41a0ba
mov edx, dword [0x525230]
mov ecx, dword [edx + 0x28]
mov eax, dword [esp + 0x14]
push 1
push eax
call fcn.0041adb0
lea ecx, [esp + 0xcc]
mov byte [esp + 0x170], 7
call fcn.0042e450
mov ebx, 0x10
mov byte [esp + 0x170], 6
cmp dword [esp + 0xa8], ebx
jb 0x41a100
mov ecx, dword [esp + 0x94]
push ecx
call fcn.00480d64
add esp, 4
mov byte [esp + 0x170], 1
mov dword [esp + 0xa8], edi
mov dword [esp + 0xa4], esi
mov byte [esp + 0x94], 0
cmp dword [esp + 0xc4], ebx
jb 0x41a137
mov edx, dword [esp + 0xb0]
push edx
call fcn.00480d64
add esp, 4
mov dword [esp + 0xc4], edi
mov dword [esp + 0xc0], esi
mov byte [esp + 0xb0], 0
jmp 0x419cce
mov eax, dword [ecx + 0x30]
mov ecx, dword [esp + 0xd8]
push edx
push ecx
push eax
push str.TaskID__d__ResID__d_ResVer__d_started.
call fcn.00406330
mov edx, dword [esp + 0xe8]
mov dword [esp + 0x20], edx
jmp 0x41a3df
cmp eax, 1
jne 0x41a2d4
mov eax, dword [esp + 0xd8]
mov edi, dword [esp + 0x14]
mov dword [esp + 0x10], eax
lea edx, [esp + 0x10]
lea eax, [edi + 0xac]
call fcn.00442740
test byte [eax], 2
je 0x41a1be
lea ecx, [esp + 0xcc]
mov byte [esp + 0x170], 7
call fcn.0042e450
jmp 0x41a41d
push edi
lea ebx, [esp + 0xd0]
lea ecx, [esp + 0x58]
call fcn.004186a0
test eax, eax
je 0x41a29c
mov edx, dword [esp + 0xdc]
mov ecx, dword [esp + 0x18]
mov ecx, dword [ecx + 0x30]
push eax
mov eax, dword [esp + 0xdc]
push edx
push eax
push ecx
push str.TaskID__d__ResID__d_ResVer__d_failed___d__
call fcn.00406330
add esp, 0x14
push str.Break
lea ecx, [esp + 0x30]
call fcn.00402830
mov byte [esp + 0x170], 0xc
mov ecx, dword [esp + 0xe4]
push eax
push ecx
call fcn.0040d200
add esp, 8
mov byte [esp + 0x170], 8
cmp dword [esp + 0x40], 0x10
mov bl, al
jb 0x41a242
mov edx, dword [esp + 0x2c]
push edx
call fcn.00480d64
add esp, 4
lea ecx, [esp + 0xcc]
test bl, bl
je 0x41a40e
mov eax, dword [esp + 0x14]
push eax
call fcn.0041ad70
lea ecx, [esp + 0xcc]
mov byte [esp + 0x170], 7
call fcn.0042e450
lea ecx, [esp + 0x94]
mov byte [esp + 0x170], 6
call fcn.00402fd0
lea ecx, [esp + 0xb0]
mov byte [esp + 0x170], 1
call fcn.00402fd0
jmp 0x419cce
mov ecx, dword [esp + 0xdc]
mov edx, dword [esp + 0xd8]
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 0x30]
push ecx
push edx
push eax
push str.TaskID__d__ResID__d_ResVer__d_started.
call fcn.00406330
mov eax, dword [esp + 0xe8]
mov dword [esp + 0x20], eax
lea eax, [edi + 0xac]
jmp 0x41a3e8
cmp dword [esp + 0x24], ebx
je 0x41a2fb
mov ebx, dword [esp + 0x14]
lea ecx, [esp + 0xcc]
lea edi, [esp + 0x54]
call fcn.00419960
test eax, eax
je 0x41a407
mov edi, 0x10
mov ecx, dword [esp + 0x14]
push ecx
lea ebx, [esp + 0xd0]
lea ecx, [esp + 0x58]
call fcn.004186a0
test eax, eax
je 0x41a3b2
mov edx, dword [esp + 0x18]
mov ecx, dword [edx + 0x30]
mov edx, dword [esp + 0xd8]
push eax
mov eax, dword [esp + 0xe0]
push eax
push edx
push ecx
push str.TaskID__d__ResID__d_ResVer__d_failed___d__
call fcn.00406330
add esp, 0x14
push 5
push str.Break
lea ecx, [esp + 0x34]
mov dword [esp + 0x48], 0xf
mov dword [esp + 0x44], 0
mov byte [esp + 0x34], 0
call fcn.00402a70
lea eax, [esp + 0x2c]
mov byte [esp + 0x170], 0xd
mov ecx, dword [esp + 0xe4]
push eax
push ecx
call fcn.0040d200
add esp, 8
mov byte [esp + 0x170], 8
mov bl, al
cmp dword [esp + 0x40], edi
jb 0x41a39d
mov edx, dword [esp + 0x2c]
push edx
call fcn.00480d64
add esp, 4
test bl, bl
je 0x41a407
mov ecx, dword [esp + 0x14]
push ecx
lea ecx, [esp + 0xd0]
jmp 0x41a256
mov ecx, dword [esp + 0xdc]
mov edx, dword [esp + 0xd8]
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 0x30]
push ecx
push edx
push eax
push str.TaskID__d__ResID__d_ResVer__d_started.
call fcn.00406330
mov eax, dword [esp + 0xe8]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x24]
add eax, 0xac
add esp, 0x10
lea edx, [esp + 0x10]
call fcn.00442740
or dword [eax], 2
lea edx, [esp + 0xcc]
lea ecx, [esp + 0x54]
call fcn.0041cfa0
lea ecx, [esp + 0xcc]
mov byte [esp + 0x170], 7
call fcn.0042e450
xor ebx, ebx
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
inc esi
mov dword [esp + 0x1c], esi
call fcn.004065d0
cmp esi, dword [eax + 0xc]
jl 0x419de4
mov eax, dword [esp + 0x28]
mov esi, dword [eax + 0x10]
mov ecx, esi
cmp esi, 6
jb 0x41a44b
mov ecx, 6
mov edi, 0x10
cmp dword [eax + 0x14], edi
jb 0x41a457
mov eax, dword [eax]
push ecx
push 0x50cc60
push eax
call fcn.00402790
add esp, 0xc
cmp eax, ebx
jne 0x41a47e
cmp esi, 6
jae 0x41a474
or eax, 0xffffffff
jmp 0x41a47c
xor eax, eax
cmp esi, 6
setne al
cmp eax, ebx
sete al
cmp al, bl
je 0x41a493
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x54]
push edx
call fcn.0041cd80
mov byte [esp + 0x170], 6
cmp dword [esp + 0xa8], edi
jb 0x41a4b4
mov eax, dword [esp + 0x94]
push eax
call fcn.00480d64
add esp, 4
mov esi, 0xf
mov byte [esp + 0x170], 1
mov dword [esp + 0xa8], esi
mov dword [esp + 0xa4], ebx
mov byte [esp + 0x94], bl
cmp dword [esp + 0xc4], edi
jb 0x41a4ef
mov ecx, dword [esp + 0xb0]
push ecx
call fcn.00480d64
add esp, 4
mov dword [esp + 0xc4], esi
mov dword [esp + 0xc0], ebx
mov byte [esp + 0xb0], bl
mov dword [esp + 0x54], vtable.tpsp::TASKITEM.0
lea edx, [esp + 0x54]
mov dword [esp + 0x170], edi
cmp edx, dword [0x52521c]
je 0x41a532
mov ecx, dword [esp + 0x80]
cmp ecx, ebx
je 0x41a532
mov eax, dword [ecx]
mov edx, dword [eax]
push 1
call edx
mov eax, dword [esp + 0x74]
push eax
call fcn.00481b34
mov byte [esp + 0x174], 0xe
add esp, 4
lea ecx, [esp + 0x58]
call fcn.004bd0a0
lea ecx, [esp + 0x54]
mov dword [esp + 0x170], 0xffffffff
call fcn.0049ac60
mov ecx, dword [esp + 0x168]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x150]
xor ecx, esp
call fcn.004809b9
mov esp, ebp
pop ebp
ret 4