Function at 0x40d930
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4141f8
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push ebx
push esi
push edi
mov eax, dword [0x41b020]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
add esi, 0x30
lea eax, [ebp - 0x48]
push eax
mov ecx, esi
mov dword [ebp - 0x18], esi
call fcn.0040df40
mov dword [ebp - 4], 0
mov edi, dword [esi + 0x10]
cmp dword [esi + 0xc], edi
jbe 0x40d981
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ebx, dword [esi + 0xc]
mov ecx, dword [esi]
mov dword [ebp - 0x20], ecx
cmp ebx, dword [esi + 0x10]
jbe 0x40d994
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov edx, dword [ebp - 0x20]
mov eax, dword [esi]
push edi
push edx
push ebx
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0040e160
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x10]
mov byte [edx + 0x3c4], 0
mov edi, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x38]
cmp edi, eax
jbe 0x40d9c6
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov eax, dword [ebp - 0x38]
mov ebx, dword [ebp - 0x48]
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], edi
nop
mov edi, dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x3c], eax
jbe 0x40d9e0
call edi
test ebx, ebx
je 0x40d9e9
cmp ebx, dword [ebp - 0x48]
je 0x40d9eb
call edi
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x1c], eax
je 0x40daa7
test ebx, ebx
jne 0x40da9c
call edi
xor eax, eax
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [eax + 0x10]
jb 0x40da0d
call edi
mov edx, dword [ebp - 0x1c]
mov esi, dword [edx]
lea edi, [esi + 0x3ac]
mov byte [esi + 0x3c4], 0
mov ebx, dword [edi + 0x10]
cmp dword [edi + 0xc], ebx
jbe 0x40da2d
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ecx, dword [edi + 0xc]
mov eax, dword [edi]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x14], ecx
cmp ecx, dword [edi + 0x10]
jbe 0x40da46
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x28]
mov eax, dword [edi]
push ebx
push edx
push ecx
push eax
lea ebx, [ebp - 0x30]
call fcn.00409430
mov ecx, dword [esi + 0x1d0]
test ecx, ecx
je 0x40da6d
mov esi, dword [esi + 0x1d4]
test esi, esi
je 0x40da6d
call esi
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x40daa3
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
xor eax, eax
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [eax + 0x10]
jb 0x40da8a
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
add dword [ebp - 0x1c], 4
mov eax, dword [ebp - 0x38]
mov ebx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x18]
jmp 0x40d9d0
mov eax, dword [ebx]
jmp 0x40da03
mov eax, dword [eax]
jmp 0x40da7c
mov edx, dword [esi + 0x10]
sub edx, dword [esi + 0xc]
test edx, 0xfffffffc
jne 0x40dad7
mov esi, dword [ebp + 8]
mov ecx, dword [esi]
test ecx, ecx
je 0x40dac8
mov eax, dword [esi + 4]
test eax, eax
je 0x40dac8
push esi
call eax
push esi
call fcn.0040d650
push esi
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x40dae7
push eax
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x48]
push eax
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4