Function at 0x40e9d0
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x583890
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x5e9750]
xor eax, esp
mov dword [esp + 0x70], eax
push ebx
push esi
push edi
mov eax, dword [0x5e9750]
xor eax, esp
push eax
lea eax, [esp + 0x88]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
xor eax, eax
mov ebx, ecx
mov esi, vtable.CArray_int__int_.0
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x90], eax
mov eax, dword [ebx + 0x18]
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x30]
call fcn.0040fbd0
xor eax, eax
mov dword [esp + 0x5c], esi
mov dword [esp + 0x60], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x64], eax
mov byte [esp + 0x90], 1
mov eax, dword [ebx + 0x18]
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x64]
call fcn.0040fbd0
mov dword [esp + 0x3c], esi
xor esi, esi
mov dword [esp + 0x40], esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x44], esi
mov byte [esp + 0x90], 2
mov eax, dword [ebx + 0x18]
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x44]
call fcn.0040fbd0
mov eax, dword [ebx + 0xc]
cmp eax, esi
jne 0x40eab0
mov ecx, dword [edi + 8]
sub ecx, dword [edi]
jmp 0x40eab6
mov ecx, dword [edi + 0xc]
sub ecx, dword [edi + 4]
mov esi, dword [ebx + 0x18]
mov edx, dword [ebx + 0x2c]
dec esi
imul esi, dword [ebx + 0x28]
neg edx
add edx, edx
sub edx, esi
add edx, ecx
test eax, eax
mov eax, dword [ebx + 0x2c]
mov dword [esp + 0x18], edx
jne 0x40eadf
add dword [edi + 4], eax
mov ecx, dword [ebx + 0x2c]
sub dword [edi + 0xc], ecx
jmp 0x40eae7
add dword [edi], eax
mov ecx, dword [ebx + 0x2c]
sub dword [edi + 8], ecx
mov eax, dword [ebx + 0x18]
mov esi, dword [esp + 0x60]
xor edi, edi
mov dword [esp + 0x14], edi
cmp eax, edi
jle 0x40ece4
mov eax, dword [esp + 0x2c]
sub eax, esi
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x40]
sub eax, esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x54], eax
test edi, edi
js 0x40ed33
cmp edi, dword [ebx + 0x18]
jge 0x40ed33
mov edx, dword [ebx + 0x14]
mov eax, dword [edx + edi*4]
lea esi, [edx + edi*4]
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov esi, dword [esi]
mov dword [esp + 0x58], esi
mov byte [esp + 0x90], 3
cmp dword [ebx + 0xc], 0
jne 0x40ebee
test esi, esi
jne 0x40eb58
xor eax, eax
jmp 0x40eb5a
mov eax, dword [esi]
test byte [eax + 4], 1
je 0x40eb8b
test esi, esi
jne 0x40eb68
xor ecx, ecx
jmp 0x40eb6a
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax]
push 0
call edx
cmp edi, dword [esp + 0x30]
jge 0x40ed33
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x20]
sub dword [esp + 0x18], eax
mov dword [ecx + edx], eax
test esi, esi
jne 0x40eb93
xor eax, eax
jmp 0x40eb95
mov eax, dword [esi]
test byte [eax + 4], 1
jne 0x40ebaf
test esi, esi
jne 0x40eba3
xor eax, eax
jmp 0x40eba5
mov eax, dword [esi]
test byte [eax + 4], 2
jne 0x40ebaf
inc dword [esp + 0x14]
test esi, esi
jne 0x40ebb7
xor ecx, ecx
jmp 0x40ebb9
mov ecx, dword [esi]
cmp edi, dword [esp + 0x64]
jge 0x40ed33
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
mov ecx, dword [esp + 0x20]
mov dword [ecx], eax
test esi, esi
jne 0x40ebd8
xor ecx, ecx
jmp 0x40ebda
mov ecx, dword [esi]
cmp edi, dword [esp + 0x44]
jge 0x40ed33
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
jmp 0x40ec88
test esi, esi
jne 0x40ebf6
xor eax, eax
jmp 0x40ebf8
mov eax, dword [esi]
test byte [eax + 4], 4
je 0x40ec2a
test esi, esi
jne 0x40ec06
xor ecx, ecx
jmp 0x40ec08
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push 0
call edx
cmp edi, dword [esp + 0x30]
jge 0x40ed33
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x20]
sub dword [esp + 0x18], eax
mov dword [ecx + edx], eax
test esi, esi
jne 0x40ec32
xor eax, eax
jmp 0x40ec34
mov eax, dword [esi]
test byte [eax + 4], 4
jne 0x40ec4e
test esi, esi
jne 0x40ec42
xor eax, eax
jmp 0x40ec44
mov eax, dword [esi]
test byte [eax + 4], 8
jne 0x40ec4e
inc dword [esp + 0x14]
test esi, esi
jne 0x40ec56
xor ecx, ecx
jmp 0x40ec58
mov ecx, dword [esi]
cmp edi, dword [esp + 0x64]
jge 0x40ed33
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
call edx
mov ecx, dword [esp + 0x20]
mov dword [ecx], eax
test esi, esi
jne 0x40ec77
xor ecx, ecx
jmp 0x40ec79
mov ecx, dword [esi]
cmp edi, dword [esp + 0x44]
jge 0x40ed33
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
call eax
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x54]
mov dword [ecx + edx], eax
mov byte [esp + 0x90], 2
test esi, esi
je 0x40eccd
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40eccd
mov ecx, dword [esi]
test ecx, ecx
je 0x40ecbe
mov edx, dword [ecx]
mov eax, dword [edx + 0x1c]
push 1
call eax
push esi
mov dword [esi], 0
call fcn.0044663b
add esp, 4
add dword [esp + 0x20], 4
inc edi
cmp edi, dword [ebx + 0x18]
jl 0x40eb14
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x60]
test edx, edx
jg 0x40ecf0
mov dword [esp + 0x18], 0
cmp dword [esp + 0x14], 0xffffffff
jne 0x40ed38
cmp dword [esp + 0x40], 0
je 0x40ed0b
mov ecx, dword [esp + 0x40]
push ecx
call fcn.0044663b
add esp, 4
test esi, esi
je 0x40ed18
push esi
call fcn.0044663b
add esp, 4
cmp dword [esp + 0x2c], 0
je 0x40ed2c
mov edx, dword [esp + 0x2c]
push edx
call fcn.0044663b
add esp, 4
xor al, al
jmp 0x40f149
call fcn.0044700e
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0x60]
push ecx
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x24]
push eax
push ebx
call fcn.0040de10
test al, al
jne 0x40ed8c
mov eax, dword [esp + 0x40]
test eax, eax
je 0x40ed67
push eax
call fcn.0044663b
add esp, 4
test esi, esi
je 0x40ed74
push esi
call fcn.0044663b
add esp, 4
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x40ed2c
push eax
call fcn.0044663b
add esp, 4
xor al, al
jmp 0x40f149
lea ecx, [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x60]
push edx
lea eax, [esp + 0x30]
push eax
push ecx
lea edx, [esp + 0x28]
push edx
push ebx
call fcn.0040e2f0
test al, al
je 0x40ed56
cmp dword [esp + 0x18], 0
jle 0x40efbb
xor edi, edi
mov dword [esp + 0x14], edi
cmp dword [ebx + 0x18], edi
jle 0x40efbb
lea esp, [esp]
test edi, edi
js 0x40ed33
cmp edi, dword [ebx + 0x18]
jge 0x40ed33
mov eax, dword [ebx + 0x14]
lea esi, [eax + edi*4]
mov eax, dword [esi]
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
cmp dword [ebx + 0xc], 0
mov esi, dword [esi]
jne 0x40ee1e
test esi, esi
jne 0x40ee03
xor eax, eax
jmp 0x40ee05
mov eax, dword [esi]
test byte [eax + 4], 1
je 0x40ee1e
test esi, esi
jne 0x40ee13
xor eax, eax
jmp 0x40ee15
mov eax, dword [esi]
test dword [eax + 4], 0x100
jne 0x40ee41
test esi, esi
jne 0x40ee26
xor eax, eax
jmp 0x40ee28
mov eax, dword [esi]
test byte [eax + 4], 4
je 0x40ee45
test esi, esi
jne 0x40ee36
xor eax, eax
jmp 0x40ee38
mov eax, dword [esi]
test dword [eax + 4], 0x200
je 0x40ee45
inc dword [esp + 0x14]
test esi, esi
je 0x40ee75
lea ecx, [esi + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40ee75
mov ecx, dword [esi]
test ecx, ecx
je 0x40ee66
mov edx, dword [ecx]
mov eax, dword [edx + 0x1c]
push 1
call eax
push esi
mov dword [esi], 0
call fcn.0044663b
add esp, 4
inc edi
cmp edi, dword [ebx + 0x18]
jl 0x40edd0
cmp dword [esp + 0x14], 0
jle 0x40efbb
xor edi, edi
cmp dword [ebx + 0x18], edi
jle 0x40efbb
test edi, edi
js 0x40ed33
mov ecx, dword [esp + 0x1c]
cmp edi, dword [ecx + 0x18]
jge 0x40ed33
mov edx, ecx
mov esi, dword [edx + 0x14]
mov eax, dword [esi + edi*4]
lea ebx, [edi*4]
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov esi, dword [esi + ebx]
mov dword [esp + 0x58], esi
mov eax, dword [esp + 0x1c]
mov byte [esp + 0x90], 4
cmp dword [eax + 0xc], 0
jne 0x40eeff
test esi, esi
jne 0x40eee4
xor eax, eax
jmp 0x40eee6
mov eax, dword [esi]
test byte [eax + 4], 1
je 0x40eeff
test esi, esi
jne 0x40eef4
xor eax, eax
jmp 0x40eef6
mov eax, dword [esi]
test dword [eax + 4], 0x100
jne 0x40ef22
test esi, esi
jne 0x40ef07
xor eax, eax
jmp 0x40ef09
mov eax, dword [esi]
test byte [eax + 4], 4
je 0x40ef73
test esi, esi
jne 0x40ef17
xor eax, eax
jmp 0x40ef19
mov eax, dword [esi]
test dword [eax + 4], 0x200
je 0x40ef73
mov ecx, dword [esp + 0x14]
cmp ecx, 1
jne 0x40ef52
cmp edi, dword [esp + 0x30]
jge 0x40ed33
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x2c]
add dword [eax + ebx], ecx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
jmp 0x40ef73
cmp edi, dword [esp + 0x30]
jge 0x40ed33
mov eax, dword [esp + 0x18]
cdq
idiv ecx
mov edx, dword [esp + 0x2c]
add dword [edx + ebx], eax
sub dword [esp + 0x18], eax
dec ecx
mov dword [esp + 0x14], ecx
mov byte [esp + 0x90], 2
test esi, esi
je 0x40efab
lea edx, [esi + 4]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40efab
mov ecx, dword [esi]
test ecx, ecx
je 0x40ef9c
mov eax, dword [ecx]
mov edx, dword [eax + 0x1c]
push 1
call edx
push esi
mov dword [esi], 0
call fcn.0044663b
add esp, 4
mov eax, dword [esp + 0x1c]
inc edi
cmp edi, dword [eax + 0x18]
jl 0x40ee95
mov ebx, eax
cmp dword [ebx + 0xc], 0
jne 0x40efc9
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx]
jmp 0x40efd0
mov edx, dword [esp + 0x24]
mov eax, dword [edx + 4]
mov ecx, dword [esp + 0x1c]
mov ebx, dword [ecx + 0x2c]
add ebx, eax
cmp dword [ecx + 0x18], 0
mov dword [esp + 0x14], 0
jle 0x40f114
jmp 0x40eff0
mov eax, dword [esp + 0x14]
test eax, eax
js 0x40ed33
mov ecx, dword [esp + 0x1c]
cmp eax, dword [ecx + 0x18]
jge 0x40ed33
mov edi, eax
mov edx, ecx
mov esi, dword [edx + 0x14]
add edi, edi
add edi, edi
mov eax, dword [esi + edi]
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov esi, dword [esi + edi]
mov dword [esp + 0x58], esi
mov ecx, dword [esp + 0x1c]
xor eax, eax
mov byte [esp + 0x90], 5
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
cmp dword [ecx + 0xc], eax
jne 0x40f072
mov edx, dword [esp + 0x14]
cmp edx, dword [esp + 0x30]
jge 0x40ed33
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x2c]
mov ecx, dword [edx + 0xc]
mov eax, dword [edi + eax]
mov edx, dword [edx + 4]
push ecx
add eax, ebx
push eax
push edx
push ebx
jmp 0x40f096
mov edx, dword [esp + 0x30]
cmp dword [esp + 0x14], edx
jge 0x40ed33
mov eax, dword [esp + 0x2c]
mov eax, dword [edi + eax]
mov edx, dword [esp + 0x24]
mov ecx, dword [edx + 8]
mov edx, dword [edx]
add eax, ebx
push eax
push ecx
push ebx
push edx
lea ecx, [esp + 0x80]
push ecx
call dword [sym.imp.USER32.dll_SetRect]
test esi, esi
jne 0x40f0ac
xor ecx, ecx
jmp 0x40f0ae
mov ecx, dword [esi]
mov edx, dword [ecx]
mov edx, dword [edx + 0x18]
lea eax, [esp + 0x70]
push eax
call edx
mov eax, dword [esp + 0x2c]
mov ecx, dword [edi + eax]
mov edi, dword [esp + 0x1c]
add ecx, dword [edi + 0x28]
mov byte [esp + 0x90], 2
add ebx, ecx
test esi, esi
je 0x40f102
lea edx, [esi + 4]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40f102
mov ecx, dword [esi]
test ecx, ecx
je 0x40f0f3
mov eax, dword [ecx]
mov edx, dword [eax + 0x1c]
push 1
call edx
push esi
mov dword [esi], 0
call fcn.0044663b
add esp, 4
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x14], eax
cmp eax, dword [edi + 0x18]
jl 0x40eff0
mov eax, dword [esp + 0x40]
test eax, eax
je 0x40f125
push eax
call fcn.0044663b
add esp, 4
mov eax, dword [esp + 0x60]
test eax, eax
je 0x40f136
push eax
call fcn.0044663b
add esp, 4
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x40f147
push eax
call fcn.0044663b
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x88]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.00545559
mov esp, ebp
pop ebp
ret 4