Function at 0x40d42c
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
xor esi, esi
test eax, eax
jne 0x40d446
mov eax, 0xffffff9a
jmp 0x40d632
mov ebx, eax
cmp dword [ebx + 0x2c], 0
jne 0x40d458
mov eax, 0xffffff9a
jmp 0x40d632
xor edx, edx
mov dword [ebx + 0x34], edx
cmp dword [ebx + 0x80], 8
jne 0x40d4b0
cmp dword [ebx + 0x84], 0
jne 0x40d4b0
test esi, esi
jne 0x40d4b0
cmp dword [ebx + 0x40], 0
jne 0x40d491
push ebx
call fcn.0040d294
pop ecx
inc eax
mov dword [ebx + 0x40], 0x4000
lea ecx, [ebx + 0x88]
mov dword [ebx + 0x3c], ecx
mov edi, dword [ebx + 0x44]
push 4
lea eax, [ebx + 0x30]
push eax
call fcn.0040589c
mov esi, eax
mov eax, dword [ebx + 0x44]
sub eax, edi
add esp, 8
add dword [ebx + 0x6c], eax
test esi, esi
je 0x40d473
cmp esi, 1
jne 0x40d4b7
xor esi, esi
cmp dword [ebx + 0x6c], 0
jbe 0x40d4ce
test esi, esi
jne 0x40d4ce
push ebx
call fcn.0040d294
pop ecx
inc eax
jne 0x40d4ce
or esi, 0xffffffff
cmp dword [ebx + 0x80], 8
jne 0x40d4f1
cmp dword [ebx + 0x84], 0
jne 0x40d4f1
lea eax, [ebx + 0x30]
push eax
call fcn.00405ce8
mov esi, eax
xor eax, eax
pop ecx
mov dword [ebx + 0x68], eax
cmp dword [ebx + 0x84], 0
jne 0x40d509
mov edx, dword [ebx + 0x408c]
mov dword [ebp + 0x10], edx
mov ecx, dword [ebx + 0x38]
mov dword [ebp + 0xc], ecx
mov edi, dword [ebx + 0x44]
add edi, dword [ebx + 0x40a4]
push 4
mov eax, dword [ebp + 0x10]
push eax
mov edx, dword [ebx + 0x74]
add edx, 0x10
push edx
call fcn.0040c604
add esp, 0xc
push 4
push edi
mov ecx, dword [ebx + 0x74]
add ecx, 0x14
push ecx
call fcn.0040c604
add esp, 0xc
cmp dword [ebx + 0x5c], 1
jne 0x40d552
push 2
push 1
mov eax, dword [ebx + 0x74]
add eax, 0x24
push eax
call fcn.0040c604
add esp, 0xc
push 4
mov edx, dword [ebp + 0xc]
push edx
mov ecx, dword [ebx + 0x74]
add ecx, 0x18
push ecx
call fcn.0040c604
add esp, 0xc
test esi, esi
jne 0x40d581
mov eax, dword [ebx + 0x78]
push eax
mov edx, dword [ebx + 0x74]
push edx
lea ecx, [ebx + 0x24]
push ecx
call fcn.0040c4fc
add esp, 0xc
mov esi, eax
mov eax, dword [ebx + 0x74]
push eax
call fcn.0041fe80
pop ecx
test esi, esi
jne 0x40d625
mov edx, dword [ebx + 0x20]
push edx
mov ecx, dword [ebx + 0x1c]
push ecx
call dword [ebx + 0xc]
add esp, 8
mov dword [ebp - 4], eax
push 0
mov eax, dword [ebx + 0x70]
add eax, 0xe
push eax
mov edx, dword [ebx + 0x20]
push edx
mov ecx, dword [ebx + 0x1c]
push ecx
call dword [ebx + 0x10]
add esp, 0x10
test eax, eax
je 0x40d5c2
or esi, 0xffffffff
test esi, esi
jne 0x40d5db
push 4
mov eax, dword [ebp + 0x10]
push eax
mov edx, dword [ebx + 0x20]
push edx
push ebx
call fcn.0040c5b4
add esp, 0x10
mov esi, eax
test esi, esi
jne 0x40d5f1
push 4
push edi
mov eax, dword [ebx + 0x20]
push eax
push ebx
call fcn.0040c5b4
add esp, 0x10
mov esi, eax
test esi, esi
jne 0x40d60a
push 4
mov eax, dword [ebp + 0xc]
push eax
mov edx, dword [ebx + 0x20]
push edx
push ebx
call fcn.0040c5b4
add esp, 0x10
mov esi, eax
push 0
mov eax, dword [ebp - 4]
push eax
mov edx, dword [ebx + 0x20]
push edx
mov ecx, dword [ebx + 0x1c]
push ecx
call dword [ebx + 0x10]
add esp, 0x10
test eax, eax
je 0x40d625
or esi, 0xffffffff
inc dword [ebx + 0x40b0]
xor eax, eax
mov dword [ebx + 0x2c], eax
mov eax, esi
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret