Function at 0x46b3e0
Capabilities:
Access peb ldr_data
Get process heap flags
Get process heap force flags

Disassembly:
push 0xffffffffffffffff
push 0x51fbb0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4c
mov eax, dword [0x565e78]
push ebx
push ebp
push esi
push edi
xor ebx, ebx
mov edi, 0xf
mov dword [esp + 0x58], eax
mov esi, ecx
mov dword [esp + 0x54], edi
mov dword [esp + 0x50], ebx
mov byte [esp + 0x40], bl
mov dword [esp + 0x64], ebx
mov eax, dword [esp + 0x6c]
push eax
lea eax, [esp + 0x40]
call fcn.004086b0
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x44]
push ecx
lea ecx, [esp + 0x2c]
mov dword [esp + 0x44], edi
mov dword [esp + 0x40], ebx
mov byte [esp + 0x30], bl
call fcn.004018b0
push esi
push str.RoomId
lea edx, [esp + 0x28]
push edx
mov byte [esp + 0x70], 1
call fcn.0046b740
lea eax, [esi + 4]
push eax
push str.Type
lea ecx, [esp + 0x28]
push ecx
call fcn.0046b740
lea edx, [esi + 8]
push edx
push str.MinExp
lea eax, [esp + 0x28]
push eax
call fcn.0046b740
lea ecx, [esi + 0xc]
push ecx
push str.MaxExp
lea edx, [esp + 0x28]
push edx
call fcn.0046b740
lea eax, [esi + 0x10]
push eax
push str.BeginTime
lea ecx, [esp + 0x28]
push ecx
call fcn.0046b740
lea edx, [esi + 0x14]
push edx
push str.EndTime
lea eax, [esp + 0x28]
push eax
call fcn.0046b740
lea ecx, [esi + 0x18]
push ecx
push 0x540798
lea edx, [esp + 0x28]
push edx
call fcn.0046b740
lea eax, [esi + 0x1c]
push eax
push str.InitGameMoney
lea ecx, [esp + 0x28]
push ecx
call fcn.0046b740
lea edx, [esp + 0x10]
push edx
mov dword [esp + 0x14], ebx
push str.prizeSize
lea eax, [esp + 0x28]
push eax
call fcn.0046b740
mov eax, dword [esi + 0x24]
cmp eax, ebx
lea ebp, [esi + 0x20]
je 0x46b50e
push eax
call fcn.004fa776
add esp, 4
mov eax, dword [esp + 0x10]
cmp eax, ebx
mov dword [ebp + 4], ebx
mov dword [ebp + 8], ebx
mov dword [ebp + 0xc], ebx
jle 0x46b5fc
xor edi, edi
mov dword [esp + 0x10], eax
lea esp, [esp]
mov edx, dword [ebp + 4]
cmp edx, ebx
jne 0x46b53b
xor ecx, ecx
jmp 0x46b543
mov ecx, dword [ebp + 8]
sub ecx, edx
sar ecx, 4
cmp edx, ebx
je 0x46b578
mov eax, dword [ebp + 0xc]
sub eax, edx
sar eax, 4
cmp ecx, eax
jae 0x46b578
mov ecx, dword [esp + 0x6c]
mov ebx, dword [ebp + 8]
push ecx
lea edx, [esp + 0x14]
mov ecx, 1
mov eax, ebx
call fcn.00467af0
add ebx, 0x10
add esp, 4
mov dword [ebp + 8], ebx
xor ebx, ebx
jmp 0x46b58d
mov eax, dword [ebp + 8]
lea edx, [esp + 0x10]
push edx
push eax
mov ecx, 1
mov edx, ebp
call fcn.004580b0
mov eax, dword [esi + 0x24]
add eax, edi
push eax
push str.StartId
lea ecx, [esp + 0x28]
push ecx
call fcn.0046b740
mov eax, dword [esi + 0x24]
add eax, edi
add eax, 4
push eax
push str.EndId
lea edx, [esp + 0x28]
push edx
call fcn.0046b740
mov eax, dword [esi + 0x24]
add eax, edi
add eax, 8
push eax
push str.PrizeId
lea eax, [esp + 0x28]
push eax
call fcn.0046b740
mov eax, dword [esi + 0x24]
add eax, edi
add eax, 0xc
push eax
push str.Count
lea ecx, [esp + 0x28]
push ecx
call fcn.0046b740
mov eax, dword [esp + 0x10]
add edi, 0x10
dec eax
mov dword [esp + 0x10], eax
jne 0x46b530
lea edx, [esp + 0x10]
push edx
push str.MoneySize
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x1c], ebx
call fcn.0046b740
mov eax, dword [esi + 0x34]
cmp eax, ebx
lea edi, [esi + 0x30]
je 0x46b627
push eax
call fcn.004fa776
add esp, 4
mov eax, dword [esp + 0x10]
test eax, eax
mov dword [edi + 4], ebx
mov dword [edi + 8], ebx
mov dword [edi + 0xc], ebx
jle 0x46b6dc
lea esp, [esp]
mov edx, dword [edi + 4]
test edx, edx
jne 0x46b64b
xor ecx, ecx
jmp 0x46b653
mov ecx, dword [edi + 8]
sub ecx, edx
sar ecx, 3
test edx, edx
je 0x46b686
mov eax, dword [edi + 0xc]
sub eax, edx
sar eax, 3
cmp ecx, eax
jae 0x46b686
mov ecx, dword [esp + 0x6c]
mov ebp, dword [edi + 8]
push ecx
lea edx, [esp + 0x14]
mov ecx, 1
mov eax, ebp
call fcn.00469c20
add esp, 4
add ebp, 8
mov dword [edi + 8], ebp
jmp 0x46b69b
mov eax, dword [edi + 8]
lea edx, [esp + 0x10]
push edx
push eax
mov ecx, 1
mov edx, edi
call fcn.00412930
mov eax, dword [esi + 0x34]
lea ebp, [ebx*8]
add eax, ebp
push eax
push str.Money
lea ecx, [esp + 0x28]
push ecx
call fcn.0046b740
mov eax, dword [esi + 0x34]
add eax, ebp
add eax, 4
push eax
push str.GameMoney
lea edx, [esp + 0x28]
push edx
call fcn.0046b740
mov eax, dword [esp + 0x10]
inc ebx
cmp ebx, eax
jl 0x46b640
mov eax, dword [esp + 0x38]
mov esi, 0x10
cmp eax, esi
jb 0x46b6f6
mov eax, dword [esp + 0x24]
push eax
call fcn.004fa776
add esp, 4
mov eax, dword [esp + 0x54]
pop edi
cmp eax, esi
pop esi
pop ebp
mov dword [esp + 0x2c], 0xf
mov dword [esp + 0x28], 0
mov byte [esp + 0x18], 0
pop ebx
jb 0x46b724
mov ecx, dword [esp + 0x30]
push ecx
call fcn.004fa776
add esp, 4
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x5c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x48]
call fcn.004b6cac
add esp, 0x58
ret