Function at 0x40d060
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x51b468
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28
push ebx
push ebp
push esi
push edi
mov ebp, ecx
call fcn.004fc30b
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x48]
mov ecx, dword [ebp + 0x58]
push eax
push ecx
lea edx, [esp + 0x20]
push 0x52f42c
push edx
mov dword [esp + 0x50], 0
call fcn.004024a0
mov eax, dword [esp + 0x28]
add esp, 0x10
push eax
mov ecx, 0x589134
call fcn.004095a0
mov esi, dword [sym.imp.rgss102j.dll_RGSSGetInt]
push 0x52f52c
call esi
mov edi, eax
push 0x52f520
inc edi
call dword [sym.imp.rgss102j.dll_RGSSGetStringACP]
add esp, 8
push eax
lea ecx, [esp + 0x34]
call fcn.00402700
push 0x52f510
mov byte [esp + 0x44], 1
call esi
push 0x52f4fc
mov ebx, eax
call esi
push 0x52f4e4
mov dword [esp + 0x38], eax
call esi
push 0x52f4d0
mov dword [esp + 0x38], eax
call esi
push 0x52f4b8
mov dword [esp + 0x38], eax
call esi
push 0x52f4a4
mov dword [esp + 0x38], eax
call esi
push 0x52f494
mov dword [esp + 0x30], eax
call esi
add esp, 0x1c
mov dword [esp + 0x34], eax
call fcn.004fc30b
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x10], eax
mov byte [esp + 0x40], 2
call fcn.004fc30b
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [esp + 0x1c], esi
push 0xff
mov byte [esp + 0x44], 3
call fcn.004fc27e
test eax, eax
je 0x40d18f
push 0xff
push eax
lea ecx, [esp + 0x24]
call fcn.00401f20
mov esi, dword [esp + 0x1c]
push edi
lea eax, [esp + 0x14]
push esi
push eax
mov byte [esp + 0x4c], 4
call fcn.004024a0
lea eax, [esi - 0x10]
add esp, 0xc
mov byte [esp + 0x40], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d1c2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x48]
push 0
push 0
push 0
push 0
push esi
push edi
push 1
mov ecx, ebp
call fcn.004f8624
mov eax, dword [esp + 0x30]
push eax
push 1
push edi
mov ecx, ebp
call fcn.004f8286
cmp ebx, 1
jne 0x40d270
call fcn.004fc30b
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [esp + 0x48], esi
push 0x100
mov byte [esp + 0x44], 5
call fcn.004fc27e
test eax, eax
je 0x40d22a
push 0x100
push eax
lea ecx, [esp + 0x50]
call fcn.00401f20
mov esi, dword [esp + 0x48]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
push eax
mov eax, dword [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x34]
push edx
push eax
push ecx
lea edx, [esp + 0x24]
push esi
push edx
mov byte [esp + 0x5c], 6
call fcn.004024a0
lea eax, [esi - 0x10]
add esp, 0x1c
mov byte [esp + 0x40], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x40d35c
cmp ebx, 2
jne 0x40d2f1
call fcn.004fc30b
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [esp + 0x48], esi
push 0x101
mov byte [esp + 0x44], 7
call fcn.004fc27e
test eax, eax
je 0x40d2ae
push 0x101
push eax
lea ecx, [esp + 0x50]
call fcn.00401f20
mov esi, dword [esp + 0x48]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
push eax
mov eax, dword [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x34]
push edx
push eax
push ecx
lea edx, [esp + 0x24]
push esi
push edx
mov byte [esp + 0x5c], 8
call fcn.004024a0
lea eax, [esi - 0x10]
add esp, 0x1c
mov byte [esp + 0x40], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x40d35c
cmp ebx, 3
jne 0x40d375
call fcn.004fc30b
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [esp + 0x48], esi
push 0x102
mov byte [esp + 0x44], 9
call fcn.004fc27e
test eax, eax
je 0x40d32f
push 0x102
push eax
lea ecx, [esp + 0x50]
call fcn.00401f20
mov esi, dword [esp + 0x48]
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x14]
push esi
push ecx
mov byte [esp + 0x4c], 0xa
call fcn.004024a0
lea eax, [esi - 0x10]
add esp, 0xc
mov byte [esp + 0x40], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40d366
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov esi, dword [esp + 0x10]
push esi
push 2
mov ecx, ebp
push edi
call fcn.004f8286
mov eax, dword [esp + 0x34]
test eax, eax
jne 0x40d392
push 0x103
call fcn.004fc27e
test eax, eax
je 0x40d3d2
push 0x103
jmp 0x40d3c4
cmp eax, 1
jne 0x40d3ac
push 0x104
call fcn.004fc27e
test eax, eax
je 0x40d3d2
push 0x104
jmp 0x40d3c4
cmp eax, 2
jne 0x40d3dd
push 0x105
call fcn.004fc27e
test eax, eax
je 0x40d3d2
push 0x105
lea ecx, [esp + 0x14]
push eax
call fcn.00401f20
mov esi, dword [esp + 0x10]
push esi
push 3
mov ecx, ebp
push edi
call fcn.004f8286
lea eax, [esi - 0x10]
mov byte [esp + 0x40], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
pop edi
pop esi
pop ebp
pop ebx
jg 0x40d400
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x30], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d423
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 8]
add eax, 0xfffffff0
mov dword [esp + 0x30], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d449
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
add esp, 0x34
ret 4