Function at 0x40f780
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x504e3b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
mov eax, dword [0x56b44c]
push ebx
push ebp
mov ebp, ecx
mov dword [esp + 8], eax
lea ecx, [esp + 8]
mov dword [esp + 0x30], 0
push ecx
lea ecx, [ebp + 0x1a8]
call fcn.004de8d8
mov edx, dword [0x56b44c]
mov dword [esp + 0xc], edx
lea eax, [esp + 0xc]
lea ecx, [ebp + 0x1e4]
push eax
mov byte [esp + 0x34], 1
call fcn.004de8d8
mov ecx, dword [0x56b44c]
mov dword [esp + 0x18], ecx
lea edx, [esp + 0x18]
lea ecx, [ebp + 0xb8]
push edx
mov byte [esp + 0x34], 2
call fcn.004de8d8
mov eax, dword [0x56b44c]
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x30], 3
push ecx
lea ecx, [ebp + 0x7c]
call fcn.004de8d8
mov edx, dword [esp + 0xc]
mov eax, dword [edx - 8]
test eax, eax
jne 0x40f857
lea eax, [esp + 0x20]
push 2
push eax
lea ecx, [esp + 0x10]
call fcn.004d6f0d
mov ecx, dword [eax]
push 0x55c73c
push ecx
call fcn.004bdb15
add esp, 8
lea ecx, [esp + 0x20]
test eax, eax
sete bl
call fcn.004e1e27
test bl, bl
je 0x40fabc
mov edx, dword [esp + 8]
mov eax, dword [edx - 8]
test eax, eax
jne 0x40f870
lea eax, [esp + 0xc]
lea ecx, [esp + 8]
push eax
call fcn.004e1f6e
push esi
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push edi
mov dword [ebp + 0x5c], 1
mov ecx, dword [ebp + 0x23c]
push 0
push 0
push 0x1004
push ecx
call esi
mov edx, dword [esp + 0x10]
push 0
push 0
push 0
push 0
lea edi, [ebp + 0x220]
push edx
push eax
push 1
mov ecx, edi
call fcn.004d96f0
mov ebx, eax
mov eax, dword [esp + 0x14]
push eax
push 1
push ebx
mov ecx, edi
call fcn.004d97eb
push 0
push ebx
mov ecx, edi
call fcn.004d8d51
mov ecx, dword [ebp + 0x23c]
push 0
push ebx
push 0x1013
push ecx
call esi
push 3
push 3
push ebx
mov ecx, edi
call fcn.004d97c0
mov ecx, edi
call fcn.004e14d7
push 0x24
call fcn.004e24f0
add esp, 4
mov dword [esp + 0x2c], eax
test eax, eax
mov byte [esp + 0x38], 4
je 0x40f90f
mov ecx, eax
call fcn.0040ec40
mov ebx, eax
jmp 0x40f911
xor ebx, ebx
lea edx, [esp + 0x10]
lea ecx, [ebx + 8]
push edx
mov byte [esp + 0x3c], 3
call fcn.004e1f6e
lea eax, [esp + 0x14]
lea ecx, [ebx + 4]
push eax
call fcn.004e1f6e
lea ecx, [esp + 0x20]
push ecx
lea ecx, [ebx + 0xc]
call fcn.004e1f6e
lea edx, [esp + 0x1c]
lea ecx, [ebx + 0x10]
push edx
call fcn.004e1f6e
mov eax, dword [ebp + 0x14c]
xor edi, edi
push edi
push edi
push 0xf0
push eax
call esi
mov dword [ebx + 0x14], eax
mov ecx, dword [ebp + 0x188]
push edi
push edi
push 0xf0
push ecx
call esi
mov dword [ebx + 0x18], eax
mov edx, dword [ebp + 0x110]
push edi
push edi
push 0xf0
push edx
call esi
mov dword [ebx + 0x1c], eax
mov dword [ebx + 0x20], edi
mov edx, dword [ebp + 0x70]
mov eax, dword [ebp + 0x6c]
mov esi, edx
mov dword [esp + 0x24], esi
inc esi
cmp esi, edi
jne 0x40f9b4
cmp eax, edi
je 0x40f9a9
push eax
call fcn.004e2519
add esp, 4
mov dword [ebp + 0x6c], edi
mov dword [ebp + 0x74], edi
mov dword [ebp + 0x70], edi
jmp 0x40faa6
cmp eax, edi
jne 0x40f9ec
lea edi, [esi*4]
push edi
call fcn.004e24f0
mov edx, eax
mov ecx, edi
mov dword [ebp + 0x6c], edx
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
mov dword [ebp + 0x74], esi
mov dword [ebp + 0x70], esi
jmp 0x40faa4
mov ecx, dword [ebp + 0x74]
cmp esi, ecx
jg 0x40fa0c
cmp esi, edx
jle 0x40fa04
mov ecx, esi
lea edi, [eax + edx*4]
sub ecx, edx
xor eax, eax
rep stosd dword es:[edi], eax
xor edi, edi
mov dword [ebp + 0x70], esi
jmp 0x40faa6
mov eax, dword [ebp + 0x78]
cmp eax, edi
jne 0x40fa36
mov eax, edx
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp eax, 4
jge 0x40fa2a
mov eax, 4
jmp 0x40fa36
cmp eax, 0x400
jle 0x40fa36
mov eax, 0x400
add eax, ecx
cmp esi, eax
mov dword [esp + 0x18], eax
jl 0x40fa44
mov dword [esp + 0x18], esi
mov eax, dword [esp + 0x18]
lea ecx, [eax*4]
push ecx
call fcn.004e24f0
mov ecx, dword [ebp + 0x70]
mov esi, dword [ebp + 0x6c]
shl ecx, 2
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov dword [esp + 0x30], eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x28]
mov edx, dword [ebp + 0x70]
lea esi, [ecx + 1]
lea edi, [eax + edx*4]
mov ecx, esi
xor eax, eax
sub ecx, edx
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x6c]
push eax
call fcn.004e2519
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
add esp, 8
mov dword [ebp + 0x6c], edx
mov dword [ebp + 0x70], esi
mov dword [ebp + 0x74], eax
xor edi, edi
mov ecx, dword [ebp + 0x6c]
mov edx, dword [esp + 0x24]
mov dword [ecx + edx*4], ebx
mov ecx, ebp
mov dword [ebp + 0x5c], edi
call fcn.00410860
pop edi
pop esi
lea ecx, [esp + 0x14]
mov byte [esp + 0x30], 2
call fcn.004e1e27
lea ecx, [esp + 0x18]
mov byte [esp + 0x30], 1
call fcn.004e1e27
lea ecx, [esp + 0xc]
mov byte [esp + 0x30], 0
call fcn.004e1e27
lea ecx, [esp + 8]
mov dword [esp + 0x30], 0xffffffff
call fcn.004e1e27
mov ecx, dword [esp + 0x28]
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x2c
ret