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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x48
mov ecx, dword [edi]
mov dword [esp + 8], ecx
mov ecx, dword [ecx + 4]
mov dword [esp + 0xc], ecx
movsx ecx, byte [edi + 0x44]
push ebx
mov ebx, dword [edi + ecx*4 + 0x78]
mov edx, dword [ebx + 0x40]
push esi
movzx esi, word [edi + ecx*2 + 0x50]
mov dword [esp + 0x28], ecx
mov cx, word [edx + esi*2]
mov dh, cl
and al, 2
mov dword [esp + 0x2c], 0
mov byte [esp + 0xf], al
mov dword [esp + 0x1c], esi
mov dword [esp + 0x24], ebx
mov dl, ch
movzx ecx, dx
movzx edx, word [ebx + 0x18]
and ecx, edx
add ecx, dword [ebx + 0x38]
mov dword [esp + 0x18], ecx
test al, al
je 0x41f418
cmp byte [ebx + 8], 0
je 0x41f409
push ecx
push ebx
call fcn.004178a0
movzx ecx, word [ebx + 0x14]
mov edx, dword [esp + 0x1c]
mov edx, dword [edx + 0x24]
movzx eax, ax
lea ecx, [eax + ecx + 2]
add edx, edx
mov eax, 0xaaaaaaab
mul edx
shr edx, 1
add esp, 8
cmp ecx, edx
jg 0x41f409
mov dword [esp + 0x2c], 1
jmp 0x41f418
mov esi, edi
call fcn.004170d0
test eax, eax
jne 0x41f6ca
cmp byte [ebx + 8], 0
jne 0x41f46f
and byte [edi + 0x40], 0xf1
xor eax, eax
cmp byte [edi + 0x42], 1
mov dword [esp + 0x20], 0
mov word [edi + 0x22], ax
jne 0x41f458
movsx eax, byte [edi + 0x44]
cmp word [edi + eax*2 + 0x50], 0
je 0x41f458
mov ecx, dword [edi + eax*4 + 0x78]
cmp byte [ecx + 8], 0
je 0x41f458
mov edx, 0xffff
add word [edi + eax*2 + 0x50], dx
jmp 0x41f46f
lea eax, [esp + 0x20]
push eax
mov eax, edi
call fcn.0041bd40
add esp, 4
test eax, eax
jne 0x41f6ca
mov dl, byte [edi + 0x40]
test dl, 0x20
je 0x41f4b7
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 8]
mov ecx, dword [edi + 0x34]
test eax, eax
je 0x41f499
cmp eax, edi
je 0x41f492
test ecx, ecx
je 0x41f4a1
cmp dword [eax + 0x34], ecx
je 0x41f4a1
mov eax, dword [eax + 8]
test eax, eax
jne 0x41f485
and dl, 0xdf
mov byte [edi + 0x40], dl
jmp 0x41f4b7
test eax, eax
je 0x41f499
push edi
push ecx
call fcn.00417190
add esp, 8
test eax, eax
jne 0x41f6ca
cmp dword [edi + 0x48], 0
jne 0x41f50a
mov ecx, dword [edi + 0x10]
mov edx, dword [edi + 0x14]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x10]
cmp byte [ecx + 0xb], 0
mov dword [esp + 0x34], edx
je 0x41f50a
mov eax, dword [ecx + 4]
mov byte [ecx + 0xb], 0
mov eax, dword [eax + 8]
test eax, eax
je 0x41f50a
test byte [eax + 0x40], 0x10
je 0x41f503
mov byte [ecx + 0xb], 1
mov edx, dword [eax + 0x10]
cmp edx, dword [esp + 0x30]
jne 0x41f503
mov edx, dword [eax + 0x14]
cmp edx, dword [esp + 0x34]
jne 0x41f503
mov byte [eax + 0x42], 0
mov eax, dword [eax + 8]
test eax, eax
jne 0x41f4e3
mov esi, dword [ebx + 0x48]
call fcn.004132d0
test eax, eax
jne 0x41f6ca
mov eax, dword [esp + 0x18]
push eax
lea eax, [esp + 0x3c]
mov ecx, ebx
call fcn.0041c7e0
movzx edx, word [esp + 0x4e]
add esp, 4
lea ecx, [esp + 0x10]
push ecx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x20]
push edx
push eax
mov esi, ebx
call fcn.0041cd00
mov eax, dword [esp + 0x1c]
add esp, 0xc
test eax, eax
jne 0x41f6ca
cmp byte [ebx + 8], al
jne 0x41f635
movsx ecx, byte [edi + 0x44]
mov ebx, dword [edi + ecx*4 + 0x78]
mov edx, dword [esp + 0x28]
mov eax, dword [edi + edx*4 + 0x7c]
mov ecx, dword [eax + 4]
movzx edx, word [ebx + 0x16]
mov eax, dword [ebx + 0x40]
mov esi, dword [ebx + 0x38]
mov dword [esp + 0x30], ecx
mov cx, word [eax + edx*2 - 2]
mov dh, cl
mov dl, ch
movzx ecx, word [ebx + 0x18]
movzx eax, dx
and eax, ecx
add eax, esi
add esi, 4
mov dword [esp + 0x18], eax
cmp eax, esi
jae 0x41f5b0
mov eax, 0x105a4
call fcn.0047f450
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebx + 0x4c]
push eax
push ebx
call edx
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 0x50]
mov esi, dword [ebx + 0x48]
movzx eax, ax
add esp, 8
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], edx
call fcn.004132d0
mov dword [esp + 0x10], eax
test eax, eax
jne 0x41f60b
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x28]
add edx, 0xfffffffc
push edx
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x24]
add ecx, 4
push edx
call fcn.0041ce40
add esp, 0x14
movzx edx, word [ebx + 0x16]
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x10]
push eax
push ecx
dec edx
push edx
mov esi, ebx
call fcn.0041cd00
mov eax, dword [esp + 0x1c]
add esp, 0xc
test eax, eax
jne 0x41f6ca
mov ebx, dword [esp + 0x24]
mov ecx, edi
call fcn.0041eea0
test eax, eax
jne 0x41f6ca
movsx ecx, byte [edi + 0x44]
mov esi, dword [esp + 0x28]
cmp ecx, esi
jle 0x41f67e
mov al, byte [edi + 0x44]
movsx edx, al
mov ecx, dword [edi + edx*4 + 0x78]
dec al
mov byte [edi + 0x44], al
test ecx, ecx
je 0x41f66b
mov eax, dword [ecx + 0x48]
call fcn.00412bd0
movsx eax, byte [edi + 0x44]
cmp eax, esi
jg 0x41f650
mov ecx, edi
call fcn.0041eea0
test eax, eax
jne 0x41f6ca
cmp dword [esp + 0x2c], 0
je 0x41f6b8
mov byte [edi + 0x42], 2
movzx ecx, word [ebx + 0x16]
cmp dword [esp + 0x1c], ecx
jl 0x41f6ab
mov dword [edi + 0x3c], 0xffffffff
mov dx, word [ebx + 0x16]
dec dx
mov word [edi + esi*2 + 0x50], dx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x3c], 1
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, edi
call fcn.0041b2a0
cmp byte [esp + 0xf], 0
je 0x41f6ca
mov byte [edi + 0x42], 3
pop esi
pop ebx
mov esp, ebp
pop ebp
ret