Function at 0x499358
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xc
push 0
push 0
dec ecx
jne 0x499360
push ebx
push esi
push edi
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x49960e
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, esi
call fcn.00406b40
lea eax, [ebp - 8]
call fcn.00406b88
mov eax, dword [ebx + 0xc]
cmp dword [eax + 0x30], 0
je 0x4995a0
xor edx, edx
push ebp
push 0x499596
push dword fs:[edx]
mov dword fs:[edx], esp
lea eax, [ebp - 0x10]
call fcn.0040a0fc
push eax
mov eax, dword [ebx + 0xc]
mov eax, dword [eax + 0x30]
push eax
mov eax, dword [eax]
call dword [eax + 0x48]
test eax, 0x80000000
sete al
test al, al
je 0x49958c
lea eax, [ebp - 0x18]
call fcn.0040a0fc
push eax
mov eax, dword [0x4b719c]
push eax
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [eax]
call dword [eax]
test eax, 0x80000000
sete al
test al, al
je 0x49958c
lea eax, [ebp - 0x1c]
call fcn.0040a0fc
push eax
push 0x499620
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [eax]
call dword [eax + 0xbc]
test eax, 0x80000000
sete al
test al, al
je 0x49958c
lea eax, [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [eax]
call dword [eax + 0x24]
mov edi, dword [ebp - 0x34]
dec edi
test edi, edi
jl 0x49958c
inc edi
xor ebx, ebx
lea eax, [ebp - 0x14]
call fcn.0040a0fc
push eax
lea eax, [ebp - 0x44]
mov edx, ebx
mov cl, 0xfc
call fcn.0042d668
push dword [ebp - 0x38]
push dword [ebp - 0x3c]
push dword [ebp - 0x40]
push dword [ebp - 0x44]
lea eax, [ebp - 0x54]
mov edx, ebx
mov cl, 0xfc
call fcn.0042d668
push dword [ebp - 0x48]
push dword [ebp - 0x4c]
push dword [ebp - 0x50]
push dword [ebp - 0x54]
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [eax]
call dword [eax + 0x2c]
test eax, 0x80000000
sete al
test al, al
je 0x499584
lea eax, [ebp - 0x20]
call fcn.0040a0fc
push eax
mov eax, dword [0x4b7058]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [eax]
call dword [eax]
test eax, 0x80000000
sete al
test al, al
je 0x499584
cmp dword [ebp - 0x20], 0
je 0x499584
lea eax, [ebp - 0x30]
call fcn.00427fbc
push eax
push 0
push 0x499630
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [eax]
call dword [eax + 0x20]
test eax, 0x80000000
sete al
test al, al
je 0x499584
lea edx, [ebp - 0x58]
lea eax, [ebp - 0x30]
call fcn.0042e8ac
mov edx, dword [ebp - 0x58]
lea eax, [ebp - 8]
call fcn.00407a68
lea eax, [ebp - 0x5c]
mov edx, dword [ebp - 8]
call fcn.00407a54
mov eax, dword [ebp - 0x5c]
mov edx, 0x499648
call fcn.0041b814
test eax, eax
jne 0x499565
lea eax, [ebp - 0x30]
call fcn.00427fbc
push eax
push 0
push 0x499664
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [eax]
call dword [eax + 0x20]
test eax, 0x80000000
sete al
test al, al
je 0x499584
lea edx, [ebp - 0x60]
lea eax, [ebp - 0x30]
call fcn.0042e8ac
mov edx, dword [ebp - 0x60]
lea eax, [ebp - 0xc]
call fcn.00407a68
mov eax, esi
mov edx, dword [ebp - 0xc]
call fcn.00407a54
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4995a0
lea eax, [ebp - 4]
call fcn.00406b88
push eax
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [eax]
call dword [eax + 0xf0]
mov eax, esi
mov edx, dword [ebp - 4]
call fcn.00407a54
inc ebx
dec edi
jne 0x499438
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4995a0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x499615
lea eax, [ebp - 0x60]
mov edx, 3
call fcn.00406ba0
lea eax, [ebp - 0x54]
mov edx, dword [0x4012a0]
mov ecx, 2
call fcn.00408150
lea eax, [ebp - 0x30]
call fcn.00427fbc
lea eax, [ebp - 0x20]
call fcn.0040a0fc
lea eax, [ebp - 0x1c]
call fcn.0040a0fc
lea eax, [ebp - 0x18]
call fcn.0040a0fc
lea eax, [ebp - 0x14]
mov edx, dword [0x401dc0]
mov ecx, 2
call fcn.00408150
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.00406c00
ret