Function at 0x419d30
Capabilities:
Check mutex on windows
Check os version
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4f08c2
mov eax, dword fs:[0]
push eax
sub esp, 0x248
mov eax, dword [0x51e584]
xor eax, esp
mov dword [esp + 0x240], eax
push ebx
push esi
push edi
mov eax, dword [0x51e584]
xor eax, esp
push eax
lea eax, [esp + 0x258]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov esi, edx
xor ebx, ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x30], ecx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x260], ebx
lea ecx, [esp + 0x60]
mov dword [esp + 0x5c], vtable.tpsp::TASKITEM.0
call fcn.004bdb50
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x84], ebx
mov dword [esp + 0x90], ebx
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x88], ebx
mov dword [esp + 0x94], ebx
mov eax, 1
xor ecx, ecx
mov dword [esp + 0x260], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], ecx
cmp dword [esi + 0x24], ebx
jle 0x419e99
mov edi, eax
cmp ecx, dword [esi + 0x24]
jl 0x419e4d
push 0x265
push str.E:WorkCodeTPSPTpsp
push 3
lea ecx, [esp + 0x40]
mov byte [esp + 0x33], bl
call fcn.0049a7e0
mov byte [esp + 0x260], 2
or dword [esp + 0x20], edi
push str.CHECK_failed:__index_____size___:
mov ecx, eax
call fcn.0049aad0
push eax
lea ecx, [esp + 0x2b]
call fcn.0049ad20
mov dword [esp + 0x260], edi
test byte [esp + 0x20], 1
je 0x419e69
and dword [esp + 0x20], 0xfffffffe
lea ecx, [esp + 0x34]
call fcn.0049a810
mov edx, dword [esi + 0x20]
mov eax, dword [esp + 0x28]
mov eax, dword [edx + eax*4]
mov edi, dword [esp + 0x14]
push eax
call fcn.0041ae00
test eax, eax
je 0x419ed8
mov ecx, dword [esp + 0x28]
mov edi, 1
add ecx, edi
mov dword [esp + 0x28], ecx
cmp ecx, dword [esi + 0x24]
jl 0x419e4d
mov edi, dword [esp + 0x1c]
push 0x103
lea edx, [esp + 0x149]
push ebx
push edx
mov byte [esp + 0x150], bl
call fcn.00485940
add esp, 0xc
cmp dword [edi + 0x10], ebx
je 0x419f21
cmp dword [edi + 0x14], 0x10
jb 0x419ec3
mov edi, dword [edi]
push edi
push str.Tpsp_Charging_SingTask___s
push 0x104
lea eax, [esp + 0x150]
push eax
jmp 0x419f37
mov dword [esp + 0x5c], vtable.tpsp::TASKITEM.0
lea ecx, [esp + 0x5c]
mov dword [esp + 0x260], 5
cmp ecx, dword [0x52621c]
je 0x419f0a
mov ecx, dword [esp + 0x88]
cmp ecx, ebx
je 0x419f0a
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov ecx, dword [esp + 0x7c]
push ecx
call fcn.0048280a
mov byte [esp + 0x264], 3
jmp 0x41a787
mov eax, dword [esi + 0x30]
push eax
push str.Tpsp_Charging_SingTask___d
push 0x104
lea ecx, [esp + 0x150]
push ecx
call fcn.00482205
add esp, 0x10
lea edx, [esp + 0x144]
push edx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x419f83
cmp edi, ebx
je 0x419f6a
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x5c]
mov dword [esp + 0x260], 0xffffffff
call fcn.0042d9f0
jmp 0x41a7a7
mov eax, dword [esi + 0x30]
mov edi, dword [esp + 0x14]
lea ecx, [esp + 0x5c]
push ecx
push eax
call fcn.0041c310
cmp eax, ebx
je 0x419fd4
lea edx, [esp + 0x5c]
mov dword [esp + 0x2c], ebx
cmp esi, edx
je 0x419fbd
mov eax, dword [esp + 0x5c]
mov ecx, edx
mov edx, dword [eax + 0xc]
call edx
mov ecx, dword [esp + 0x18]
lea esi, [esp + 0x5c]
call fcn.0042e3f0
lea ebx, [esp + 0x5c]
call fcn.00406670
lea edi, [eax + 8]
call fcn.00420960
mov esi, dword [esp + 0x18]
xor ebx, ebx
mov eax, 0xf
mov dword [esp + 0xcc], eax
mov dword [esp + 0xc8], ebx
mov byte [esp + 0xb8], bl
mov dword [esp + 0xb0], eax
mov dword [esp + 0xac], ebx
mov byte [esp + 0x9c], bl
lea eax, [esp + 0x9c]
push eax
lea edx, [esp + 0xbc]
mov ecx, esi
mov byte [esp + 0x264], 7
call fcn.0040c3c0
mov eax, esi
mov dword [esp + 0x28], ebx
call fcn.00406650
mov eax, dword [eax + 0xc]
cmp eax, ebx
jle 0x41a67b
mov eax, dword [esp + 0x18]
call fcn.00406650
mov esi, dword [esp + 0x28]
lea edi, [eax + 8]
call fcn.00421ce0
push eax
lea ecx, [esp + 0xd8]
push ecx
call fcn.0042f320
mov byte [esp + 0x260], 8
mov edx, dword [esp + 0x140]
shr edx, 0xa
test dl, 1
je 0x41a182
push str.kernel32
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp eax, ebx
je 0x41a0b3
push str.IsWow64Process
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
cmp esi, ebx
je 0x41a0a8
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
mov edx, str.Win64
cmp dword [esp + 0x20], ebx
jne 0x41a0b8
mov edx, 0x50db38
mov edi, 0xf
mov eax, edx
mov dword [esp + 0x48], edi
mov dword [esp + 0x44], ebx
mov byte [esp + 0x34], bl
lea esi, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x41a0d0
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x3c]
call fcn.00402a60
mov byte [esp + 0x260], 9
mov eax, dword [esp + 0x130]
call fcn.00421110
mov esi, 0x10
test al, al
je 0x41a167
mov eax, dword [esp + 0x34]
cmp dword [esp + 0x48], esi
jae 0x41a10f
lea eax, [esp + 0x34]
mov ecx, dword [esp + 0x44]
push ecx
mov ecx, dword [esp + 0x134]
push ebx
push eax
call fcn.004029b0
cmp eax, 0xffffffff
jne 0x41a167
mov byte [esp + 0x260], 8
cmp dword [esp + 0x48], esi
jb 0x41a142
mov edx, dword [esp + 0x34]
push edx
call fcn.00481954
add esp, 4
lea ecx, [esp + 0xd4]
mov dword [esp + 0x48], edi
mov dword [esp + 0x44], ebx
mov byte [esp + 0x34], bl
mov byte [esp + 0x260], 7
call fcn.0042f3f0
jmp 0x41a660
mov byte [esp + 0x260], 8
cmp dword [esp + 0x48], esi
jb 0x41a182
mov eax, dword [esp + 0x34]
push eax
call fcn.00481954
add esp, 4
mov ecx, dword [esp + 0x140]
shr ecx, 0xb
test cl, 1
je 0x41a218
lea esi, [esp + 0x34]
call fcn.0040f2f0
mov byte [esp + 0x260], 0xa
mov eax, dword [esp + 0x134]
call fcn.00421110
test al, al
je 0x41a1fc
mov eax, dword [esp + 0x134]
cmp dword [eax + 0x14], 0x10
jb 0x41a1c5
mov eax, dword [eax]
push eax
call fcn.0040f550
add esp, 4
test al, al
jne 0x41a1fc
lea ecx, [esp + 0x34]
mov byte [esp + 0x260], 8
call fcn.004db8f0
lea ecx, [esp + 0xd4]
mov byte [esp + 0x260], 7
call fcn.0042f3f0
jmp 0x41a660
mov byte [esp + 0x260], 8
cmp dword [esp + 0x48], 0x10
jb 0x41a218
mov edx, dword [esp + 0x34]
push edx
call fcn.00481954
add esp, 4
mov eax, dword [esp + 0xe4]
cmp eax, ebx
jne 0x41a3c0
mov eax, dword [esp + 0x14]
push eax
lea ebx, [esp + 0xd8]
lea ecx, [esp + 0x60]
call fcn.004188e0
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0xe4]
xor esi, esi
cmp eax, esi
je 0x41a399
mov ecx, dword [ecx + 0x30]
push eax
mov eax, dword [esp + 0xe4]
push edx
push eax
push ecx
push str.TaskID__d__ResID__d_ResVer__d_failed___d__
call fcn.004063b0
add esp, 0x14
push 5
mov edi, 0xf
push str.Break
lea ecx, [esp + 0x3c]
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], esi
mov byte [esp + 0x3c], 0
call fcn.00402a60
lea ecx, [esp + 0x34]
mov byte [esp + 0x260], 0xb
mov edx, dword [esp + 0xec]
push ecx
push edx
call fcn.0040d470
add esp, 8
mov byte [esp + 0x260], 8
cmp dword [esp + 0x48], 0x10
mov bl, al
jb 0x41a2c9
mov eax, dword [esp + 0x34]
push eax
call fcn.00481954
add esp, 4
mov dword [esp + 0x48], edi
mov dword [esp + 0x44], esi
mov byte [esp + 0x34], 0
test bl, bl
je 0x41a64a
mov ecx, dword [esp + 0x140]
shr ecx, 6
test cl, 1
je 0x41a30d
mov ecx, dword [esp + 0xfc]
cmp ecx, esi
jne 0x41a301
mov edx, dword [0x526230]
mov ecx, dword [edx + 0x28]
mov eax, dword [esp + 0x14]
push 1
push eax
call fcn.0041b430
lea ecx, [esp + 0xd4]
mov byte [esp + 0x260], 7
call fcn.0042f3f0
mov ebx, 0x10
mov byte [esp + 0x260], 6
cmp dword [esp + 0xb0], ebx
jb 0x41a347
mov ecx, dword [esp + 0x9c]
push ecx
call fcn.00481954
add esp, 4
mov byte [esp + 0x260], 1
mov dword [esp + 0xb0], edi
mov dword [esp + 0xac], esi
mov byte [esp + 0x9c], 0
cmp dword [esp + 0xcc], ebx
jb 0x41a37e
mov edx, dword [esp + 0xb8]
push edx
call fcn.00481954
add esp, 4
mov dword [esp + 0xcc], edi
mov dword [esp + 0xc8], esi
mov byte [esp + 0xb8], 0
jmp 0x419f6a
mov eax, dword [ecx + 0x30]
mov ecx, dword [esp + 0xe0]
push edx
push ecx
push eax
push str.TaskID__d__ResID__d_ResVer__d_started.
call fcn.004063b0
mov edx, dword [esp + 0xf0]
mov dword [esp + 0x2c], edx
jmp 0x41a622
cmp eax, 1
jne 0x41a51b
mov eax, dword [esp + 0xe0]
mov edi, dword [esp + 0x14]
mov dword [esp + 0x1c], eax
lea edx, [esp + 0x1c]
lea eax, [edi + 0xac]
call fcn.00443740
test byte [eax], 2
je 0x41a405
lea ecx, [esp + 0xd4]
mov byte [esp + 0x260], 7
call fcn.0042f3f0
jmp 0x41a660
push edi
lea ebx, [esp + 0xd8]
lea ecx, [esp + 0x60]
call fcn.004188e0
test eax, eax
je 0x41a4e3
mov edx, dword [esp + 0xe4]
mov ecx, dword [esp + 0x18]
mov ecx, dword [ecx + 0x30]
push eax
mov eax, dword [esp + 0xe4]
push edx
push eax
push ecx
push str.TaskID__d__ResID__d_ResVer__d_failed___d__
call fcn.004063b0
add esp, 0x14
push str.Break
lea ecx, [esp + 0x38]
call fcn.00402830
mov byte [esp + 0x260], 0xc
mov ecx, dword [esp + 0xec]
push eax
push ecx
call fcn.0040d470
add esp, 8
mov byte [esp + 0x260], 8
cmp dword [esp + 0x48], 0x10
mov bl, al
jb 0x41a489
mov edx, dword [esp + 0x34]
push edx
call fcn.00481954
add esp, 4
lea ecx, [esp + 0xd4]
test bl, bl
je 0x41a651
mov eax, dword [esp + 0x14]
push eax
call fcn.0041b3f0
lea ecx, [esp + 0xd4]
mov byte [esp + 0x260], 7
call fcn.0042f3f0
lea ecx, [esp + 0x9c]
mov byte [esp + 0x260], 6
call fcn.004db8f0
lea ecx, [esp + 0xb8]
mov byte [esp + 0x260], 1
call fcn.004db8f0
jmp 0x419f6a
mov ecx, dword [esp + 0xe4]
mov edx, dword [esp + 0xe0]
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.004063b0
mov eax, dword [esp + 0xf0]
mov dword [esp + 0x2c], eax
lea eax, [edi + 0xac]
jmp 0x41a62b
cmp dword [esp + 0x2c], ebx
je 0x41a53d
mov ebx, dword [esp + 0x14]
lea ecx, [esp + 0xd4]
lea edi, [esp + 0x5c]
call fcn.00419ba0
test eax, eax
je 0x41a64a
mov ecx, dword [esp + 0x14]
push ecx
lea ebx, [esp + 0xd8]
lea ecx, [esp + 0x60]
call fcn.004188e0
test eax, eax
je 0x41a5f5
mov edx, dword [esp + 0x18]
mov ecx, dword [edx + 0x30]
mov edx, dword [esp + 0xe0]
push eax
mov eax, dword [esp + 0xe8]
push eax
push edx
push ecx
push str.TaskID__d__ResID__d_ResVer__d_failed___d__
call fcn.004063b0
add esp, 0x14
push 5
push str.Break
lea ecx, [esp + 0x3c]
mov dword [esp + 0x50], 0xf
mov dword [esp + 0x4c], 0
mov byte [esp + 0x3c], 0
call fcn.00402a60
lea eax, [esp + 0x34]
mov byte [esp + 0x260], 0xd
mov ecx, dword [esp + 0xec]
push eax
push ecx
call fcn.0040d470
add esp, 8
mov byte [esp + 0x260], 8
cmp dword [esp + 0x48], 0x10
mov bl, al
jb 0x41a5e0
mov edx, dword [esp + 0x34]
push edx
call fcn.00481954
add esp, 4
test bl, bl
je 0x41a64a
mov ecx, dword [esp + 0x14]
push ecx
lea ecx, [esp + 0xd8]
jmp 0x41a49d
mov ecx, dword [esp + 0xe4]
mov edx, dword [esp + 0xe0]
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.004063b0
mov eax, dword [esp + 0xf0]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x24]
add eax, 0xac
add esp, 0x10
lea edx, [esp + 0x1c]
call fcn.00443740
or dword [eax], 2
lea edx, [esp + 0xd4]
lea ecx, [esp + 0x5c]
call fcn.0040b2c0
lea ecx, [esp + 0xd4]
mov byte [esp + 0x260], 7
call fcn.0042f3f0
xor ebx, ebx
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x18]
inc esi
mov dword [esp + 0x28], esi
call fcn.00406650
cmp esi, dword [eax + 0xc]
jl 0x41a037
mov eax, dword [esp + 0x30]
mov esi, dword [eax + 0x10]
mov ecx, esi
cmp esi, 6
jb 0x41a68e
mov ecx, 6
mov edi, 0x10
cmp dword [eax + 0x14], edi
jb 0x41a69a
mov eax, dword [eax]
push ecx
push 0x50dcf8
push eax
call fcn.00402790
add esp, 0xc
cmp eax, ebx
jne 0x41a6c1
cmp esi, 6
jae 0x41a6b7
or eax, 0xffffffff
jmp 0x41a6bf
xor eax, eax
cmp esi, 6
setne al
cmp eax, ebx
sete al
cmp al, bl
je 0x41a6d6
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x5c]
push edx
call fcn.0041d630
mov byte [esp + 0x260], 6
cmp dword [esp + 0xb0], edi
jb 0x41a6f7
mov eax, dword [esp + 0x9c]
push eax
call fcn.00481954
add esp, 4
mov esi, 0xf
mov byte [esp + 0x260], 1
mov dword [esp + 0xb0], esi
mov dword [esp + 0xac], ebx
mov byte [esp + 0x9c], bl
cmp dword [esp + 0xcc], edi
jb 0x41a732
mov ecx, dword [esp + 0xb8]
push ecx
call fcn.00481954
add esp, 4
mov dword [esp + 0xcc], esi
mov dword [esp + 0xc8], ebx
mov byte [esp + 0xb8], bl
mov dword [esp + 0x5c], vtable.tpsp::TASKITEM.0
lea edx, [esp + 0x5c]
mov dword [esp + 0x260], edi
cmp edx, dword [0x52621c]
je 0x41a775
mov ecx, dword [esp + 0x88]
cmp ecx, ebx
je 0x41a775
mov eax, dword [ecx]
mov edx, dword [eax]
push 1
call edx
mov eax, dword [esp + 0x7c]
push eax
call fcn.0048280a
mov byte [esp + 0x264], 0xe
add esp, 4
lea ecx, [esp + 0x60]
call fcn.004bdf00
lea ecx, [esp + 0x5c]
mov dword [esp + 0x260], 0xffffffff
call fcn.0049b8d0
mov ecx, dword [esp + 0x258]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x240]
xor ecx, esp
call fcn.004815a9
mov esp, ebp
pop ebp
ret 8