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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov eax, dword [0x53f4a0]
xor eax, esp
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x14]
push ebx
push esi
push edi
mov edi, edx
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0x48]
mov dword [esp + 0x10], ecx
mov ecx, dword [edi + 0x4c]
mov edx, eax
xor esi, esi
xor ebx, ebx
or edx, ecx
je 0x40de77
mov esi, dword [edi + 0x78]
push ebx
sub eax, 1
push esi
sbb ecx, ebx
push ecx
push eax
call fcn.00502d00
push ebx
add eax, 1
push esi
adc edx, ebx
push edx
push eax
call fcn.00507750
mov esi, eax
mov ebx, edx
mov ecx, dword [edi + 0x78]
xor eax, eax
add ecx, esi
adc eax, ebx
cmp eax, dword [ebp + 0x10]
mov dword [edi + 0x48], esi
mov dword [edi + 0x4c], ebx
jl 0x40dea9
jg 0x40de92
cmp ecx, dword [ebp + 0xc]
jbe 0x40dea9
mov eax, 0x65
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.004ea5a8
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 8], 0
jne 0x40deb9
cmp esi, dword [edi + 0x50]
jne 0x40deb9
cmp ebx, dword [edi + 0x54]
je 0x40def7
mov eax, dword [edi + 0x3c]
mov ecx, dword [eax]
push ebx
push esi
push 8
lea edx, [esp + 0x28]
push edx
push eax
mov eax, dword [ecx + 8]
call eax
add esp, 0x14
test eax, eax
jne 0x40e053
mov eax, 8
xor ecx, ecx
nop
mov edx, dword [esp + ecx + 0x1c]
cmp edx, dword [ecx + 0x527258]
jne 0x40de92
sub eax, 4
add ecx, 4
cmp eax, 4
jae 0x40dee0
mov eax, dword [edi + 0x3c]
mov ecx, dword [eax]
mov edx, esi
add edx, 8
mov eax, ebx
adc eax, 0
push eax
mov eax, dword [edi + 0x3c]
push edx
push 4
lea edx, [esp + 0x24]
push edx
push eax
mov eax, dword [ecx + 8]
call eax
add esp, 0x14
test eax, eax
jne 0x40e053
mov ecx, dword [esp + 0x18]
movzx edx, cl
shl edx, 8
movzx ecx, ch
or edx, ecx
movzx ecx, byte [esp + 0x1a]
shl edx, 8
or edx, ecx
movzx ecx, byte [esp + 0x1b]
shl edx, 8
or edx, ecx
mov ecx, dword [esp + 0x14]
mov dword [ecx], edx
test eax, eax
jne 0x40e053
mov eax, esi
add eax, 0xc
lea edx, [edi + 0x2c]
push edx
mov ecx, ebx
adc ecx, 0
push ecx
push eax
mov eax, dword [edi + 0x3c]
call fcn.0040d900
add esp, 0xc
test eax, eax
jne 0x40e053
mov edx, dword [esp + 0x10]
mov eax, esi
add eax, 0x10
push edx
mov ecx, ebx
adc ecx, 0
push ecx
push eax
mov eax, dword [edi + 0x3c]
call fcn.0040d900
add esp, 0xc
test eax, eax
jne 0x40e053
mov edx, dword [edi + 0x48]
or edx, dword [edi + 0x4c]
jne 0x40e049
mov ecx, esi
add ecx, 0x14
lea eax, [esp + 0x14]
push eax
mov eax, dword [edi + 0x3c]
mov edx, ebx
adc edx, 0
push edx
push ecx
call fcn.0040d900
add esp, 0xc
test eax, eax
jne 0x40e053
lea eax, [esp + 0x10]
push eax
mov eax, dword [edi + 0x3c]
add esi, 0x18
adc ebx, 0
push ebx
push esi
call fcn.0040d900
add esp, 0xc
test eax, eax
jne 0x40e053
mov eax, dword [esp + 0x10]
cmp eax, 0x200
jb 0x40de92
mov esi, dword [esp + 0x14]
cmp esi, 0x20
jb 0x40de92
cmp eax, 0x8000
ja 0x40de92
cmp esi, 0x10000
ja 0x40de92
lea ecx, [eax - 1]
test eax, ecx
jne 0x40de92
lea edx, [esi - 1]
test esi, edx
jne 0x40de92
movzx eax, ax
lea ecx, [esp + 0x10]
push 0xffffffffffffffff
push ecx
mov dword [esp + 0x18], eax
call fcn.0040f720
add esp, 8
mov dword [edi + 0x78], esi
mov edx, dword [edi + 0x78]
add dword [edi + 0x48], edx
adc dword [edi + 0x4c], 0
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004ea5a8
mov esp, ebp
pop ebp
ret