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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [esi + 0x78]
push ebx
mov ebx, dword [esi + 0x84]
xor ecx, ecx
push edi
mov edi, dword [esi + 0xa0]
mov dword [ebp - 0xc], ecx
cmp ebx, eax
jbe 0x40dc12
mov ebx, eax
cmp dword [esi + 0x64], ecx
jle 0x40dc48
mov dword [ebp - 4], ecx
lea ebx, [ebx]
mov edx, dword [ebp - 4]
mov eax, dword [esi + 0x60]
lea eax, [eax + edx + 8]
mov edx, dword [eax]
or edx, dword [eax + 4]
jne 0x40dc3c
mov edx, dword [esi + 0x48]
mov dword [eax], edx
mov edx, dword [esi + 0x4c]
mov dword [eax + 4], edx
add dword [ebp - 4], 0x30
inc ecx
cmp ecx, dword [esi + 0x64]
jl 0x40dc20
xor ecx, ecx
mov eax, dword [esi + 0x4c]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], ecx
mov ecx, dword [esi + 0x48]
mov edx, ecx
or edx, eax
je 0x40dc85
xor edx, edx
sub ecx, 1
push edx
sbb eax, edx
mov edx, dword [esi + 0x78]
push edx
push eax
push ecx
call fcn.00502d00
mov ecx, eax
add ecx, 1
adc edx, 0
xor eax, eax
push eax
mov eax, dword [esi + 0x78]
push eax
push edx
push ecx
call fcn.00507750
jmp 0x40dc8b
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
cmp byte [esi + 8], 0
mov dword [esi + 0x48], eax
mov dword [esi + 0x4c], edx
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], edx
jne 0x40dcc4
cmp byte [esi + 5], 4
je 0x40dcc4
mov eax, dword [esi + 0x38]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 0x30]
call eax
add esp, 4
test eax, 0x200
jne 0x40dcc4
xor eax, eax
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
jmp 0x40dce3
mov ecx, dword [0x527258]
mov dword [edi], ecx
mov edx, dword [0x52725c]
mov al, 0xff
mov dword [edi + 4], edx
mov byte [edi + 8], al
mov byte [edi + 9], al
mov byte [edi + 0xa], al
mov byte [edi + 0xb], al
cmp dword [0x540c44], 0
lea eax, [esi + 0x2c]
mov dword [ebp - 4], 4
mov dword [ebp - 0x14], eax
jne 0x40dd02
mov dword [ebp - 8], 0
jmp 0x40dd1e
push 5
call dword [0x540c80]
add esp, 4
mov dword [ebp - 8], eax
test eax, eax
je 0x40dd1e
push eax
call dword [0x540c88]
add esp, 4
dec dword [ebp - 4]
call fcn.00408110
mov ecx, dword [ebp - 0x14]
mov byte [ecx], al
inc ecx
cmp dword [ebp - 4], 0
mov dword [ebp - 0x14], ecx
jne 0x40dd1e
mov eax, dword [ebp - 8]
test eax, eax
je 0x40dd46
push eax
call dword [0x540c90]
add esp, 4
mov eax, dword [esi + 0x2c]
mov byte [edi + 0xf], al
mov ecx, eax
shr ecx, 0x18
mov byte [edi + 0xc], cl
mov edx, eax
shr edx, 0x10
mov byte [edi + 0xd], dl
mov ecx, eax
shr ecx, 8
mov byte [edi + 0xe], cl
mov eax, dword [esi + 0x1c]
mov edx, eax
shr edx, 0x18
mov byte [edi + 0x10], dl
mov byte [edi + 0x13], al
mov ecx, eax
shr ecx, 0x10
mov byte [edi + 0x11], cl
mov edx, eax
shr edx, 8
mov byte [edi + 0x12], dl
mov eax, dword [esi + 0x78]
mov ecx, eax
shr ecx, 0x18
mov byte [edi + 0x14], cl
mov edx, eax
shr edx, 0x10
mov byte [edi + 0x15], dl
mov ecx, eax
shr ecx, 8
mov byte [edi + 0x16], cl
mov byte [edi + 0x17], al
mov eax, dword [esi + 0x84]
mov edx, eax
shr edx, 0x18
mov byte [edi + 0x18], dl
mov ecx, eax
mov edx, eax
mov byte [edi + 0x1b], al
shr ecx, 0x10
lea eax, [ebx - 0x1c]
push eax
mov byte [edi + 0x19], cl
lea ecx, [edi + 0x1c]
shr edx, 8
push 0
push ecx
mov byte [edi + 0x1a], dl
call fcn.004eb2d0
add esp, 0xc
mov dword [ebp - 8], 0
mov edx, dword [ebp - 8]
cmp edx, dword [esi + 0x78]
jae 0x40de0b
mov ecx, dword [esi + 0x4c]
mov eax, dword [esi + 0x3c]
mov edx, dword [eax]
push ecx
mov ecx, dword [esi + 0x48]
push ecx
push ebx
push edi
push eax
mov eax, dword [edx + 0xc]
call eax
add esp, 0x14
add dword [esi + 0x48], ebx
mov dword [ebp - 0xc], eax
adc dword [esi + 0x4c], 0
add dword [ebp - 8], ebx
test eax, eax
je 0x40ddda
mov eax, dword [ebp - 0xc]
pop edi
pop ebx
mov esp, ebp
pop ebp
ret