Function at 0x54b320
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x5ea468
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push ebp
push esi
push edi
mov eax, dword [0x638190]
xor eax, esp
push eax
lea eax, [esp + 0x34]
mov dword fs:[0], eax
mov esi, ecx
mov ebx, dword [esp + 0x44]
mov eax, dword [ebx]
mov ecx, dword [esi + 0x30]
mov edi, dword [esi + 0xc]
mov edx, eax
sub edx, ecx
add edx, eax
mov eax, dword [esi + 4]
mov dword [esi + 0x30], edx
movzx edx, word [esi + 0x20]
mov ebx, dword [ebx]
lea ecx, [edx*8 - 1]
imul ecx, edi
mov dword [esp + 0x1c], eax
mov eax, ebx
sub eax, dword [esp + 0x1c]
push edx
sub eax, ecx
add eax, ebx
add edi, eax
mov dword [esi + 4], edi
call sub.MSVCR90.dll_void____cdecl_operator_new___unsigned_int_
mov ebp, eax
xor eax, eax
add esp, 4
cmp dword [esi + 0x1c], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], eax
jle 0x54b47b
movzx ecx, word [esi + 0x20]
mov edx, dword [esi + 0x18]
push ecx
add edx, eax
push edx
push ebp
call sub.MSVCR90.dll_memcpy
add esp, 0xc
cmp byte [esi + 0x23], 2
jne 0x54b3d2
mov eax, dword [esp + 0x1c]
and eax, 0x80000001
jns 0x54b3cc
dec eax
or eax, 0xfffffffe
inc eax
jne 0x54b3d2
xor ebx, ebx
jmp 0x54b3d7
mov ebx, 1
movzx ecx, word [esi + 0x20]
lea eax, [ecx + ebp - 1]
mov cl, bl
shr byte [eax], cl
movzx edx, word [esi + 0x20]
xor al, al
sub edx, 1
mov dword [esp + 0x14], ebx
js 0x54b460
cmp ebx, 8
jge 0x54b418
mov cl, byte [edx + ebp]
mov edi, 8
sub edi, ebx
mov bl, cl
and bl, 1
add al, al
or al, bl
shr cl, 1
sub edi, 1
jne 0x54b401
mov ebx, dword [esp + 0x14]
mov byte [edx + ebp], cl
test edx, edx
jne 0x54b422
mov cl, bl
shl al, cl
jmp 0x54b448
test ebx, ebx
jle 0x54b448
mov cl, byte [edx + ebp - 1]
mov edi, ebx
lea esp, [esp]
mov bl, cl
and bl, 1
add al, al
or al, bl
shr cl, 1
sub edi, 1
jne 0x54b430
mov ebx, dword [esp + 0x14]
mov byte [edx + ebp - 1], cl
movzx ecx, word [esi + 0x20]
mov edi, dword [esi + 0x18]
sub ecx, edx
add ecx, dword [esp + 0x18]
mov byte [ecx + edi - 1], al
xor al, al
sub edx, 1
jns 0x54b3f2
movzx edx, word [esi + 0x20]
mov eax, dword [esp + 0x18]
inc dword [esp + 0x1c]
add eax, edx
cmp eax, dword [esi + 0x1c]
mov dword [esp + 0x18], eax
jl 0x54b3a2
push ebp
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
fld qword [esi + 0x28]
fldz
add esp, 4
fld st(0)
fucomp st(2)
fnstsw ax
fstp st(1)
test ah, 0x44
jnp 0x54b49e
fld qword [esi + 0x28]
fchs
fstp qword [esi + 0x28]
fld qword [esi + 0x38]
fucompp
fnstsw ax
test ah, 0x44
jnp 0x54b4b2
fld qword [esi + 0x38]
fchs
fstp qword [esi + 0x38]
mov eax, dword [esi + 0x4c]
test eax, eax
je 0x54b506
mov ecx, dword [esi + 0x50]
push ecx
push eax
lea ecx, [esp + 0x28]
call fcn.00524cf0
mov edx, dword [esp + 0x44]
push edx
lea ecx, [esp + 0x24]
mov dword [esp + 0x40], 0
call fcn.00528a50
mov eax, dword [esi + 0x50]
mov ecx, dword [esp + 0x30]
mov edx, dword [esi + 0x4c]
shl eax, 4
push eax
push ecx
push edx
call sub.MSVCR90.dll_memcpy
add esp, 0xc
lea ecx, [esp + 0x20]
mov dword [esp + 0x3c], 0xffffffff
call fcn.0052ac30
mov esi, dword [esi + 0x48]
test esi, esi
je 0x54b519
mov eax, dword [esp + 0x44]
push eax
mov ecx, esi
call fcn.0054b320
mov eax, 1
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret 4