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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x57bcd8
mov eax, dword fs:[0]
push eax
sub esp, 0x80
push ebx
push esi
push edi
mov eax, dword [0x5f969c]
xor eax, esp
push eax
lea eax, [esp + 0x90]
mov dword fs:[0], eax
lea eax, [esp + 0x34]
xor ebx, ebx
push eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
call fcn.0040d650
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov byte [esp + 0x5c], bl
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x70], bl
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], ebx
mov byte [esp + 0x84], bl
mov dword [esp + 0x98], ebx
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x1c]
push ecx
push eax
push edx
mov edx, dword [ebp + 0x18]
push edx
push ecx
push eax
mov dword [esp + 0x3c], eax
mov eax, dword [ebp + 0x20]
mov dword [esp + 0x40], ecx
push eax
xor ecx, ecx
lea edi, [esp + 0x48]
mov dword [esp + 0x2c], ebx
call fcn.0040dda0
add esp, 0x1c
test al, al
je 0x40d41a
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x1c]
mov byte [esp + 0x18], bl
mov ecx, dword [esp + 0x18]
push ecx
mov ecx, dword [ebp + 0xc]
push edx
mov edx, dword [esp + 0x60]
push eax
push ecx
push edx
lea eax, [esp + 0x30]
push eax
mov eax, dword [esp + 0x68]
call fcn.0040e010
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x34]
add esp, 0x18
push ecx
push eax
mov dword [ebp + 0xc], eax
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x38]
push eax
mov eax, dword [ebp + 0x24]
call fcn.0040d7d0
mov ecx, dword [eax]
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x40]
mov dword [ebp + 0xc], ecx
mov ecx, esi
sub ecx, edi
mov eax, 0x66666667
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
jne 0x40d30d
lea eax, [esp + 0x74]
jmp 0x40d320
cmp eax, ebx
ja 0x40d31e
call fcn.0053cc8c
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x40]
mov eax, edi
mov ecx, dword [eax + 8]
mov edx, dword [eax + 0xc]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
cmp ecx, 0xfffffffc
je 0x40d349
cmp ecx, ebx
je 0x40d33c
cmp ecx, dword [ebp + 0x18]
je 0x40d349
call fcn.0053cc8c
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x40]
mov eax, dword [esp + 0x28]
cmp eax, dword [ebp + 0x1c]
je 0x40d41a
mov ecx, esi
sub ecx, edi
mov eax, 0x66666667
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
jne 0x40d377
lea ecx, [esp + 0x74]
mov dword [esp + 0x14], ecx
jmp 0x40d38c
cmp eax, ebx
ja 0x40d388
call fcn.0053cc8c
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x40]
mov dword [esp + 0x14], edi
sub esi, edi
mov eax, 0x66666667
imul esi
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
jne 0x40d3a7
lea edi, [esp + 0x74]
jmp 0x40d3b4
cmp eax, ebx
ja 0x40d3b4
call fcn.0053cc8c
mov edi, dword [esp + 0x40]
mov eax, dword [edi]
cmp eax, 0xfffffffc
je 0x40d3cd
cmp eax, ebx
je 0x40d3c8
mov edx, dword [esp + 0x14]
cmp eax, dword [edx + 8]
je 0x40d3cd
call fcn.0053cc8c
mov eax, dword [edi + 4]
mov ecx, dword [esp + 0x14]
cmp eax, dword [ecx + 0xc]
jne 0x40d3e0
mov ecx, 0x2000
jmp 0x40d3ea
xor ecx, ecx
or dword [esp + 0x10], 0x100
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
mov esi, dword [ebp + 0x1c]
or ecx, dword [esp + 0x10]
push edx
push eax
push esi
mov esi, dword [ebp + 0x18]
push esi
push edx
mov edx, dword [ebp + 0x20]
push eax
push edx
lea edi, [esp + 0x48]
call fcn.0040dda0
add esp, 0x1c
test al, al
jne 0x40d297
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x20]
mov byte [esp + 0x1c], bl
mov eax, dword [esp + 0x1c]
push eax
mov eax, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 0x1c]
push edx
push eax
mov eax, dword [esp + 0x38]
push ecx
lea edx, [esp + 0x30]
push edx
call fcn.0040e010
mov eax, dword [esp + 0x34]
mov esi, dword [ebp + 8]
mov dword [esi], eax
mov eax, dword [esp + 0x58]
add esp, 0x18
cmp eax, ebx
je 0x40d460
push eax
call fcn.0053c3f1
add esp, 4
mov ecx, dword [esp + 0x34]
push ecx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
call fcn.0053c3f1
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x90]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret