Function at 0x40a2d0
Capabilities:
Access peb ldr_data

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5939ad
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x68
mov eax, dword [0x5de040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x4c], eax
mov edx, dword [ebx + 0x18]
add eax, 0x3c
mov ecx, dword [ebx + 8]
mov esi, dword [ebx + 0xc]
mov edi, dword [ebx + 0x24]
mov dword [ebp - 0x50], edx
mov edx, dword [ebx + 0x1c]
mov dword [ebp - 0x74], edx
mov edx, dword [ebx + 0x20]
mov dword [ebp - 0x70], edx
mov edx, dword [ebx + 0x28]
mov dword [ebp - 0x60], ecx
mov ecx, dword [ebx + 0x10]
mov dword [ebp - 0x58], edx
mov edx, dword [ebx + 0x2c]
mov dword [ebp - 0x54], ecx
mov ecx, dword [ebx + 0x14]
mov dword [ebp - 0x68], edx
mov edx, dword [ebx + 0x30]
push ecx
mov dword [ebp - 0x48], edx
mov edx, dword [ebx + 0x34]
push eax
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x5c], edx
call fcn.00409940
mov ecx, dword [ebp - 0x4c]
cmp eax, 0x10000
movzx eax, ax
jne 0x40a373
movzx eax, word [ecx + 0x5e]
mov edx, dword [ebp - 0x50]
push dword [ebp - 0x64]
cwde
mov dword [edx], eax
lea eax, [ecx + 0x24]
push eax
call fcn.00409940
mov ecx, dword [ebp - 0x58]
push dword [ebp - 0x64]
mov word [ecx], ax
mov eax, dword [ebp - 0x4c]
add eax, 0x48
push eax
call fcn.00409940
or edx, 0xffffffff
movzx ecx, ax
cmp eax, 0x10000
mov eax, dword [ebp - 0x48]
cmovne edx, ecx
cmp dword [ebp - 0x54], 0
mov word [eax], dx
je 0x40a74d
mov eax, dword [ebp - 0x50]
mov edx, dword [0x5e4408]
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x48], edx
mov ecx, dword [eax]
movzx eax, cx
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x4c]
movsx eax, word [eax + 0x5e]
cmp ecx, eax
je 0x40a432
test edx, edx
je 0x40a74d
push dword [ebp - 0x5c]
mov eax, dword [ebp - 0x54]
mov ecx, edx
push dword [ebp - 0x44]
add eax, 0x1c
push eax
call fcn.004364e0
mov esi, eax
mov dword [ebp - 0x6c], esi
test esi, esi
jne 0x40a432
push 0xa0
call fcn.0052d5e8
mov edx, dword [ebp - 0x50]
add esp, 4
mov ecx, eax
mov dword [ebp - 0x58], eax
push dword [ebp - 0x5c]
push dword [ebp - 0x54]
push dword [edx]
push dword [ebp - 0x60]
call fcn.004378e0
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x58], 1
mov eax, dword [ebp - 0x4c]
xorps xmm0, xmm0
mov ecx, dword [ebp - 0x64]
movups xmmword [ebp - 0x2c], xmm0
mov dword [ebp - 0x1c], 0
mov edx, dword [eax + 0x10]
mov dword [ebp - 0x18], 0
cmp edx, ecx
jb 0x40a76f
sub edx, ecx
mov esi, 1
cmp edx, esi
cmovb esi, edx
cmp dword [eax + 0x14], 7
mov dword [ebp - 0x44], esi
mov edx, eax
mov esi, dword [ebp - 0x6c]
jbe 0x40a474
mov edx, dword [eax]
push dword [ebp - 0x44]
lea eax, [edx + ecx*2]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00403ce0
push 0x5aabac
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 0
call fcn.0040b2a0
test eax, eax
jne 0x40a505
lea eax, [ebp - 0x40]
mov ecx, esi
push eax
push 0x3000
push dword [ebp - 0x60]
call fcn.00437a30
mov ax, word [ebp - 0x30]
test ax, ax
je 0x40a4bf
cwde
mov dword [edi], eax
mov eax, dword [esi + 0x64]
jmp 0x40a4c8
mov eax, dword [esi + 0x64]
mov dword [edi], eax
movsx eax, word [ebp - 0x2e]
cmp dword [ebp - 0x58], 0
mov dword [edi + 4], eax
je 0x40a4f1
test esi, esi
je 0x40a4f1
mov eax, dword [esi + 4]
test eax, eax
je 0x40a4e3
push eax
call dword [0x5a4080]
push 0xa0
push esi
call fcn.0052d5b7
add esp, 8
lea ecx, [ebp - 0x2c]
mov esi, 1
call fcn.00403a20
mov eax, esi
jmp 0x40a74f
cmp dword [ebp - 0x18], 7
lea eax, [ebp - 0x2c]
cmova eax, dword [ebp - 0x2c]
movzx eax, word [eax]
mov dword [ebp - 0x44], eax
cmp eax, 0xe63e
jb 0x40a589
cmp eax, 0xe757
ja 0x40a595
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x44], 0xff18
test ecx, ecx
je 0x40a553
push dword [ebp - 0x5c]
mov eax, dword [ebp - 0x50]
push 0xff18
movzx eax, word [eax]
push eax
mov eax, dword [ebp - 0x54]
add eax, 0x1c
push eax
call fcn.00436420
mov edx, eax
test edx, edx
jne 0x40a569
lea eax, [ebp - 0x40]
mov ecx, esi
push eax
push 0xff18
push dword [ebp - 0x60]
call fcn.00437a30
lea edx, [ebp - 0x40]
movzx eax, word [edx + 0x10]
mov ecx, eax
mov dword [ebp - 0x48], ecx
lea ecx, [edi + 4]
test ax, ax
je 0x40a60e
cwde
mov dword [edi], eax
mov eax, dword [esi + 0x64]
jmp 0x40a617
cmp eax, 0x20
je 0x40a5e7
cmp eax, 0x3000
je 0x40a5e7
mov ecx, dword [ebp - 0x48]
test ecx, ecx
je 0x40a5bc
push dword [ebp - 0x5c]
push eax
mov eax, dword [ebp - 0x50]
movzx eax, word [eax]
push eax
mov eax, dword [ebp - 0x54]
add eax, 0x1c
push eax
call fcn.00436420
mov edx, eax
test edx, edx
jne 0x40a5ce
mov eax, dword [ebp - 0x44]
lea ecx, [ebp - 0x40]
push ecx
push eax
push dword [ebp - 0x60]
mov ecx, esi
call fcn.00437a30
lea edx, [ebp - 0x40]
movzx eax, word [edx + 0x10]
mov ecx, eax
mov dword [ebp - 0x48], ecx
lea ecx, [edi + 4]
test ax, ax
je 0x40a60e
cwde
mov dword [edi], eax
mov eax, dword [esi + 0x64]
jmp 0x40a617
mov ecx, dword [ebp - 0x48]
test ecx, ecx
je 0x40a5bc
push dword [ebp - 0x5c]
push eax
mov eax, dword [ebp - 0x50]
movzx eax, word [eax]
push eax
mov eax, dword [ebp - 0x54]
add eax, 0x1c
push eax
push edi
push dword [ebp - 0x60]
call fcn.00436560
lea ecx, [edi + 4]
jmp 0x40a619
mov eax, dword [esi + 0x64]
mov dword [edi], eax
movsx eax, word [edx + 0x12]
mov dword [ecx], eax
mov eax, dword [esi + 0x68]
mov edx, dword [ebp - 0x74]
mov dword [edx], eax
mov eax, dword [ebx + 0x38]
add eax, eax
add dword [ecx], eax
mov ecx, dword [ebp - 0x70]
add dword [edi], eax
cmp dword [ebx + 0x3c], 0
mov eax, dword [esi + 0x6c]
mov dword [ecx], eax
je 0x40a63c
xor ecx, ecx
jmp 0x40a6a4
mov ecx, dword [0x5e44b8]
xor eax, eax
mov edx, dword [0x5e44b4]
sub ecx, edx
mov edi, dword [ebp - 0x44]
sar ecx, 1
test ecx, ecx
jle 0x40a675
movzx esi, di
mov dword [ebp - 0x70], esi
nop dword [eax + eax]
mov esi, dword [ebp - 0x70]
cmp word [edx + eax*2], si
mov esi, dword [ebp - 0x6c]
je 0x40a721
inc eax
cmp eax, ecx
jl 0x40a660
mov ecx, dword [0x5e44ac]
xor eax, eax
mov edx, dword [0x5e44a8]
sub ecx, edx
sar ecx, 1
test ecx, ecx
jle 0x40a69f
movzx edi, di
nop
cmp word [edx + eax*2], di
je 0x40a737
inc eax
cmp eax, ecx
jl 0x40a690
xor eax, eax
movzx ecx, ax
mov eax, dword [ebp - 0x68]
xor edx, edx
mov word [eax], cx
mov eax, dword [ebp - 0x4c]
mov ecx, dword [eax + 0x18]
mov eax, dword [eax + 0x1c]
sub eax, ecx
sar eax, 2
test eax, eax
je 0x40a6ed
mov esi, eax
mov eax, dword [ecx + edx*4]
mov edi, dword [eax]
cmp dword [ebp - 0x64], edi
jl 0x40a6e5
mov eax, dword [eax + 4]
add eax, edi
cmp dword [ebp - 0x64], eax
jge 0x40a6e5
mov eax, dword [ebp - 0x68]
mov ecx, 3
mov word [eax], cx
mov eax, dword [ebp - 0x4c]
mov ecx, dword [eax + 0x18]
inc edx
cmp edx, esi
jb 0x40a6c0
mov esi, dword [ebp - 0x6c]
cmp dword [ebp - 0x58], 0
je 0x40a713
test esi, esi
je 0x40a713
mov eax, dword [esi + 4]
test eax, eax
je 0x40a705
push eax
call dword [0x5a4080]
push 0xa0
push esi
call fcn.0052d5b7
add esp, 8
lea ecx, [ebp - 0x2c]
xor esi, esi
call fcn.00403a20
mov eax, esi
jmp 0x40a74f
cmp eax, 0xffffffff
je 0x40a675
mov eax, dword [ebp - 0x68]
mov ecx, 1
mov word [eax], cx
jmp 0x40a6ed
cmp eax, 0xffffffff
je 0x40a69f
mov eax, dword [ebp - 0x68]
mov ecx, 2
mov word [eax], cx
jmp 0x40a6ed
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0052d235
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x38
call fcn.00405af0
int3