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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
mov ecx, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
xor esi, esi
and ecx, 1
cmp ebx, 1
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0xc], esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], ecx
je 0x416f27
cmp byte [edi + 0x16], 0
je 0x416f27
cmp byte [edi + 0x10], 1
je 0x416f22
test byte [ebp + 0x14], 2
je 0x416f27
xor edx, edx
inc edx
jmp 0x416f29
xor edx, edx
cmp ebx, esi
jne 0x416f3d
push 0xba48
call fcn.0043d65b
pop ecx
jmp 0x4171d7
mov eax, dword [edi + 0x28]
test eax, eax
mov byte [edi + 0x17], 1
je 0x416f51
mov dword [esp + 0xc], eax
jmp 0x4170b6
xor ecx, ecx
cmp edx, ecx
je 0x41701f
mov esi, dword [edi + 0x98]
push ecx
mov eax, esi
cdq
dec ebx
push ebx
push edx
push eax
mov dword [esp + 0x28], ecx
call fcn.0043f9f0
mov ecx, dword [edi + 0x3c]
mov dword [esp + 0x10], edx
lea edx, [esp + 0x18]
push edx
push esi
push dword [esp + 0x18]
mov dword [esp + 0x18], eax
push dword [esp + 0x18]
mov eax, dword [ecx]
push ecx
call dword [eax + 0x44]
add esp, 0x14
test eax, eax
mov dword [esp + 0xc], eax
jne 0x4171b4
cmp dword [esp + 0x18], eax
je 0x417011
cmp byte [edi + 0x10], 1
jbe 0x416fbf
push dword [ebp + 0xc]
mov eax, edi
call fcn.004171de
test eax, eax
pop ecx
mov dword [esp + 0x14], eax
jne 0x416fda
push dword [esp + 0x18]
lea ebx, [esp + 0x18]
push dword [ebp + 0xc]
call fcn.0041620a
mov edi, dword [ebp + 8]
pop ecx
pop ecx
mov dword [esp + 0xc], eax
jmp 0x416ffd
push dword [esp + 0x18]
mov eax, dword [edi + 0x98]
xor ecx, ecx
push ecx
cdq
push ebx
push edx
push eax
call fcn.0043f9f0
push edx
push eax
mov eax, dword [edi + 0x3c]
call fcn.0040f0db
add esp, 0xc
mov eax, dword [esp + 0x14]
test eax, eax
je 0x417011
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
xor eax, eax
jmp 0x4171d7
cmp dword [esp + 0xc], 0
jne 0x417183
mov ebx, dword [ebp + 0xc]
mov eax, dword [edi + 0xcc]
movzx ecx, byte [eax + 0x1d]
and ecx, 3
push ecx
push ebx
push dword [eax + 0x28]
call dword [0x44a08c]
add esp, 0xc
test eax, eax
mov dword [esp + 0x18], eax
jne 0x41707c
mov esi, dword [edi + 0xcc]
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.00413bbb
test eax, eax
pop ecx
pop ecx
mov dword [esp + 0xc], eax
jne 0x417183
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x41707c
mov eax, dword [ebp + 0x10]
and dword [eax], 0
mov dword [esp + 0xc], 7
jmp 0x4171b4
mov ecx, dword [eax + 4]
cmp dword [ecx], 0
mov edx, dword [edi + 0xcc]
jne 0x417097
push eax
push ebx
push edx
call fcn.00413c32
add esp, 0xc
jmp 0x4170a7
cmp word [ecx + 0x1a], 0
jne 0x4170a1
inc dword [edx + 0xc]
inc word [ecx + 0x1a]
mov eax, ecx
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x14], eax
mov esi, eax
cmp dword [esp + 0xc], 0
jne 0x4171b4
cmp dword [esi + 0x10], 0
je 0x4170d6
test ecx, ecx
jne 0x4170d6
inc dword [edi + 0xb8]
jmp 0x41700a
cmp ebx, 0x7fffffff
mov dword [esi + 0x10], edi
ja 0x417172
mov eax, 0x40000000
cdq
idiv dword [edi + 0x98]
inc eax
cmp ebx, eax
je 0x417172
cmp dword [edi + 0x18], ebx
jb 0x417124
test ecx, ecx
jne 0x417124
mov eax, dword [edi + 0x3c]
cmp dword [eax], ecx
je 0x417124
inc dword [edi + 0xbc]
mov edi, esi
call fcn.00415d06
test eax, eax
mov dword [esp + 0xc], eax
je 0x41700a
mov edi, dword [ebp + 8]
jmp 0x417187
cmp ebx, dword [edi + 0x9c]
jbe 0x417136
mov dword [esp + 0xc], 0xd
jmp 0x417187
test ecx, ecx
je 0x41715a
cmp ebx, dword [edi + 0x1c]
ja 0x41714a
push ebx
push dword [edi + 0x38]
call fcn.004138d8
pop ecx
pop ecx
mov esi, dword [ebp + 8]
mov edi, ebx
call fcn.0041525a
mov edi, esi
mov esi, dword [esp + 0x14]
push dword [edi + 0x98]
push 0
push dword [esi + 4]
call sub.msvcrt.dll_memset
add esp, 0xc
jmp 0x41700a
push 0xba9d
call fcn.0043d65b
pop ecx
mov dword [esp + 0xc], eax
jmp 0x417187
mov esi, dword [esp + 0x14]
test esi, esi
je 0x4171b4
test byte [esi + 0x18], 2
je 0x41719b
push 1
mov eax, esi
call fcn.00413a3b
pop ecx
mov eax, dword [esi + 0x1c]
dec dword [eax + 0xc]
mov eax, dword [esi + 0x1c]
push 1
push dword [esi]
push dword [eax + 0x28]
call dword [0x44a090]
add esp, 0xc
cmp dword [edi + 0x78], 0
jne 0x4171cd
mov eax, dword [edi + 0xcc]
cmp dword [eax + 0xc], 0
jne 0x4171cd
push edi
call fcn.004154c5
pop ecx
mov eax, dword [ebp + 0x10]
and dword [eax], 0
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret