Function at 0x516b40
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x571ff7
mov eax, dword fs:[0]
push eax
sub esp, 0x44
push ebx
push esi
push edi
mov eax, dword [0x5c4008]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x34], esi
mov ecx, 0x70a6a4
call fcn.0056b0a5
xor eax, eax
push 0x34
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
call fcn.0055144c
mov edi, eax
add esp, 4
mov dword [ebp - 0x44], edi
mov dword [ebp - 4], 0
mov esi, dword [esi + 0x70]
mov dword [edi + 0x18], 0
mov dword [edi + 0x20], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x14], edi
mov dword [edi + 4], 0
mov dword [edi + 8], 0xffffffff
mov dword [edi + 0x10], 0
mov dword [edi + 0xc], 0
mov byte [edi + 0x24], 0
xor ecx, ecx
mov byte [ebp - 4], 1
mov eax, esi
mov dword [edi], vtable.CResourceItemTexture.0
mov edx, 4
mov dword [edi + 0x28], esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.005518c7
add esp, 4
mov dword [edi + 0x2c], eax
lea ecx, [esi*4]
mov dword [edi + 0x30], 0
push ecx
push 0
push eax
call fcn.00552c40
mov esi, dword [ebp - 0x34]
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
cmp byte [esi + 0x63], 0
je 0x516c49
mov eax, dword [edi + 0x30]
test eax, eax
jne 0x516c3a
push dword [esi + 0x68]
call fcn.00555564
add esp, 4
mov dword [edi + 0x30], eax
push dword [esi + 0x68]
push dword [esi + 0x64]
push eax
call fcn.00554b70
add esp, 0xc
mov byte [edi + 0x24], 1
cmp dword [esi + 0x94], 1
jne 0x516c88
cmp dword [esi + 0x98], 1
jne 0x516c88
mov edx, dword [esi + 0x90]
lea eax, [ebp - 0x1c]
push ecx
mov ecx, dword [esi + 0x8c]
push eax
push dword [esi + 0x64]
call fcn.00518940
mov ecx, dword [edi + 0x2c]
add esp, 0xc
mov dword [ecx], eax
mov ecx, dword [ebp - 0x1c]
jmp 0x516e01
mov ecx, dword [0x6d07cc]
mov edx, ecx
mov eax, dword [esi + 0x84]
mov ebx, dword [esi + 0x7c]
add eax, eax
imul ecx, ecx
sub edx, eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x2c], edx
shl ecx, 2
push ecx
call fcn.00555564
xor edx, edx
mov dword [ebp - 0x1c], eax
add esp, 4
mov dword [ebp - 0x18], edx
cmp dword [esi + 0x98], edx
jle 0x516df5
mov ecx, dword [ebp - 0x2c]
xor eax, eax
imul ecx, ebx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x4c], ecx
nop dword [eax + eax]
mov dword [ebp - 0x14], eax
xor ecx, ecx
mov eax, dword [esi + 0x94]
mov dword [ebp - 0x30], ecx
test eax, eax
jle 0x516dd9
mov edi, dword [0x6d07cc]
dec eax
cmp ecx, eax
jne 0x516d1b
mov ecx, dword [esi + 0x84]
mov eax, dword [esi + 0x9c]
mov ebx, dword [esi + 0x8c]
mov dword [ebp - 0x10], ebx
lea edx, [eax + ecx*2]
jmp 0x516d20
mov edx, edi
mov dword [ebp - 0x10], edx
mov eax, dword [esi + 0x98]
dec eax
cmp dword [ebp - 0x18], eax
jne 0x516d46
mov ecx, dword [esi + 0x84]
mov eax, dword [esi + 0xa0]
lea edi, [eax + ecx*2]
mov ecx, dword [esi + 0x90]
mov dword [ebp - 0x24], ecx
jmp 0x516d49
mov dword [ebp - 0x24], edi
mov esi, dword [esi + 0x64]
lea eax, [edx*4]
add esi, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x1c]
mov dword [ebp - 0x40], eax
test edi, edi
jle 0x516d82
push eax
push esi
push ebx
call fcn.00554b70
mov ecx, dword [ebp - 0x10]
add esp, 0xc
add esi, dword [ebp - 0x3c]
lea eax, [ecx*4]
add ebx, eax
mov eax, dword [ebp - 0x40]
sub edi, 1
jne 0x516d60
mov edx, dword [ebp - 0x24]
lea eax, [ebp - 0x48]
push ecx
mov ecx, dword [ebp - 0x10]
push eax
push dword [ebp - 0x1c]
call fcn.00518940
mov edi, dword [ebp - 0x44]
add esp, 0xc
mov edx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x34]
mov ecx, dword [edi + 0x2c]
mov dword [ecx + edx*4], eax
inc edx
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x20], eax
inc ecx
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x30], ecx
lea edx, [eax*4]
mov eax, dword [esi + 0x94]
add dword [ebp - 0x14], edx
cmp ecx, eax
jl 0x516cf6
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x38]
inc edx
add eax, dword [ebp - 0x4c]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x38], eax
cmp edx, dword [esi + 0x98]
jl 0x516ce0
mov eax, dword [ebp - 0x1c]
push eax
call fcn.005550e4
mov ecx, dword [ebp - 0x20]
add esp, 4
mov eax, dword [ebp + 0xc]
mov byte [edi + 0x24], 0
test eax, eax
js 0x516e2a
push ecx
push edi
push eax
mov ecx, esi
call fcn.0050fba0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push str.Items_out_of_range
push 2
call fcn.004e9620
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8