Function at 0x5130500
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x522a301
mov eax, dword fs:[0]
push eax
sub esp, 0x200
mov eax, dword [0x53f3c3c]
xor eax, esp
mov dword [esp + 0x1fc], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x53f3c3c]
xor eax, esp
push eax
lea eax, [esp + 0x214]
mov dword fs:[0], eax
mov esi, dword [esp + 0x224]
mov ebp, dword [esp + 0x230]
push esi
mov ecx, 0x53f4cc8
call fcn.05065960
mov edx, dword [esp + 0x22c]
movzx edi, word [esp + 0x228]
push edx
lea ecx, [eax + 0xa800]
mov eax, dword [ecx]
mov eax, dword [eax]
push 0
push edi
lea edx, [esp + 0x40]
push edx
call eax
mov edx, dword [eax + 4]
mov ecx, dword [eax]
mov dword [esp + 0x20], edx
mov edx, dword [eax + 0xc]
mov dword [esp + 0x1c], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x28], edx
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], eax
test ecx, ecx
jne 0x51305ad
lea eax, [ecx + 1]
jmp 0x51308d5
push 0x1c4
lea ecx, [esp + 0x50]
push 0
push ecx
call sub.MSVCR90.dll_memset
movzx ebx, word [esp + 0x240]
add esp, 0xc
push 0x40
lea edx, [esp + 0x50]
push edx
push edi
call sym.META_DLL.dll_META_GetPrimitiveTypeName
push eax
push str.BB_CHIP
push ebx
push ebp
push esi
mov ecx, 0x53f4cc8
call fcn.05065960
mov ecx, dword [eax + 0x2f4]
call fcn.051acee0
push 4
lea eax, [esp + 0x90]
push eax
push edi
call sym.META_DLL.dll_META_GetPrimitiveTypeName
push eax
push str.ECO_VER
push ebx
push ebp
push esi
mov ecx, 0x53f4cc8
call fcn.05065960
mov ecx, dword [eax + 0x2f4]
call fcn.051acee0
push 0x40
lea ecx, [esp + 0x94]
push ecx
push edi
call sym.META_DLL.dll_META_GetPrimitiveTypeName
push eax
push str.DSP_FW
push ebx
push ebp
push esi
mov ecx, 0x53f4cc8
call fcn.05065960
mov ecx, dword [eax + 0x2f4]
call fcn.051acee0
push 0x40
lea edx, [esp + 0xd4]
push edx
push edi
call sym.META_DLL.dll_META_GetPrimitiveTypeName
push eax
push str.DSP_PATCH
push ebx
push ebp
push esi
mov ecx, 0x53f4cc8
call fcn.05065960
mov ecx, dword [eax + 0x2f4]
call fcn.051acee0
push 0x40
lea eax, [esp + 0x114]
push eax
push edi
call sym.META_DLL.dll_META_GetPrimitiveTypeName
push eax
push str.SW_VER
push ebx
push ebp
push esi
mov ecx, 0x53f4cc8
call fcn.05065960
mov ecx, dword [eax + 0x2f4]
call fcn.051acee0
push 0x40
lea ecx, [esp + 0x154]
push ecx
push edi
call sym.META_DLL.dll_META_GetPrimitiveTypeName
push eax
push str.HW_VER
push ebx
push ebp
push esi
mov ecx, 0x53f4cc8
call fcn.05065960
mov ecx, dword [eax + 0x2f4]
call fcn.051acee0
push 0x40
lea edx, [esp + 0x194]
push edx
push edi
call sym.META_DLL.dll_META_GetPrimitiveTypeName
push eax
push str.MELODY_VER
push ebx
push ebp
push esi
mov ecx, 0x53f4cc8
call fcn.05065960
mov ecx, dword [eax + 0x2f4]
call fcn.051acee0
push str.GetTargetVerInfo_Cnf
lea eax, [esp + 0x1c]
push eax
push edi
mov dword [esp + 0x24], 0x18c
call sym.META_DLL.dll_META_GetPrimitiveTypeName
push eax
call fcn.051a8740
add esp, 0xc
cmp ebx, dword [esp + 0x18]
jl 0x513075d
push 0x40
lea ecx, [esp + 0x1d4]
push ecx
push edi
call sym.META_DLL.dll_META_GetPrimitiveTypeName
push eax
push str.SW_FLAVOR
push ebx
push ebp
push esi
mov ecx, 0x53f4cc8
call fcn.05065960
mov ecx, dword [eax + 0x2f4]
call fcn.051acee0
mov edx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x22c]
push edx
push ebx
lea eax, [esp + 0x54]
push eax
call dword [esp + 0x30]
push 0x52c722a
push 1
push 0xfa
push str..FunctionPlatformInit.cpp
lea ecx, [esp + 0x2c]
call fcn.051ae270
mov ebp, eax
mov dword [esp + 0x21c], 0
push esi
mov ecx, 0x53f4cc8
call fcn.05065960
mov edx, dword [str.NO_TYPE]
mov ecx, dword [eax + 8]
push 0
push edx
push edi
push edi
mov dword [esp + 0x24], ecx
movsx ebx, bx
call sym.META_DLL.dll_META_GetPrimitiveTypeName
push eax
mov eax, dword [esp + 0x24]
push ebx
push str.GetTargetVerInfo_Cnf
push esi
push str.__d___s_token_d_:__s__d____s__d_:_callback_OK.
push eax
push ebp
call fcn.051ae2d0
or ebp, 0xffffffff
add esp, 0x28
mov dword [esp + 0x21c], ebp
lea ecx, [esp + 0x1c]
call fcn.051ae2c0
push esi
mov ecx, 0x53f4cc8
call fcn.05065960
mov ecx, dword [eax + 0xa8e0]
add eax, 0xa8dc
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x5130875
push str._ERROR:
push 0xff
push 0xfe
push str..FunctionPlatformInit.cpp
lea ecx, [esp + 0x2c]
call fcn.051ae270
mov edi, eax
mov dword [esp + 0x21c], 1
push esi
mov ecx, 0x53f4cc8
call fcn.05065960
mov edx, dword [eax + 8]
mov dword [esp + 0x14], edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esp + 0x18]
push ebx
push str.m_TargetVerReadyEvent_token_d_:_SetEvent___failed___Err__u_.
push eax
push edi
call fcn.051ae2d0
add esp, 0x14
mov dword [esp + 0x21c], ebp
lea ecx, [esp + 0x1c]
call fcn.051ae2c0
push 0x52c722a
push 1
push 0x100
push str..FunctionPlatformInit.cpp
lea ecx, [esp + 0x2c]
call fcn.051ae270
mov edi, eax
mov dword [esp + 0x21c], 2
push esi
mov ecx, 0x53f4cc8
call fcn.05065960
mov eax, dword [eax + 8]
push ebx
push str.GetTargetVerInfo_Cnf
push esi
push str.__d___s_token_d_:_receive_target_version_ready_confirm_
push eax
push edi
call fcn.051ae2d0
add esp, 0x18
mov dword [esp + 0x21c], ebp
lea ecx, [esp + 0x1c]
call fcn.051ae2c0
mov eax, 6
mov ecx, dword [esp + 0x214]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1fc]
xor ecx, esp
call fcn.0520b902
add esp, 0x20c
ret