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

Disassembly:
sub esp, 0x34
mov ecx, dword [esp + 0x38]
push ebp
mov ebp, dword [ebx + 0xec]
push esi
mov dword [esp + 0xc], ecx
mov ecx, dword [ebx + 0x78]
mov esi, 1
shl esi, cl
cmp dword [ebx + 0x98], 0
push edi
mov edi, eax
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x20], esi
je 0x41f7c0
test edi, edi
je 0x41f7c4
lea esi, [ebx + 0x108]
mov ecx, edx
call fcn.0044ac10
mov esi, dword [esp + 0x20]
mov eax, edi
test edi, edi
jne 0x41f7f8
cmp dword [esp + 0x4c], 0
je 0x41f7db
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x44]
jbe 0x41f7db
mov dword [ebx], 3
mov eax, dword [esp + 0x10]
sub eax, dword [esp + 0x44]
pop edi
pop esi
pop ebp
add esp, 0x34
ret
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
cmp ebp, eax
sbb ecx, ecx
inc ecx
and ecx, dword [esp + 0x4c]
mov edi, 6
mov dword [esp + 0x28], ecx
cmp dword [esp + 0x48], edi
jb 0x41faa4
cmp eax, ebp
jae 0x41f81e
mov dword [esp + 0x1c], eax
mov ebp, eax
mov ecx, dword [ebx + 0x1e8]
mov edx, dword [ebx + 0x1e0]
mov eax, dword [ebx + 0x1e4]
mov dword [esp + 0x2c], edx
mov edx, dword [ebx + 0x1ec]
mov dword [esp + 0x34], ecx
mov ecx, dword [ebx + 0x1f0]
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x14]
mov edx, ecx
sub edx, eax
add edx, ebp
cmp edx, 0xa0000000
jbe 0x41f99e
mov edx, eax
mov eax, ecx
mov ecx, dword [ebx + 0x7c]
sub eax, edx
cmp dword [ebx + 0x90], edi
sbb edi, edi
inc edi
sub ecx, edi
mov edi, 1
shl edi, cl
dec edi
and edi, eax
sub eax, edi
sub eax, esi
mov edi, eax
add dword [ebx + 0x1e8], edi
sub dword [ebx + 0x1f0], edi
sub dword [ebx + 0x1ec], edi
add edx, edi
mov dword [ebx + 0x1e4], edx
mov ecx, dword [ebx + 0x80]
mov esi, dword [ebx + 0x204]
mov eax, 1
shl eax, cl
xor ecx, ecx
cdq
and edx, 0xf
add eax, edx
sar eax, 4
test eax, eax
jle 0x41f8f2
mov dword [esp + 0x24], eax
mov edx, 0x10
jmp 0x41f8d0
mov eax, dword [esi + ecx*4]
cmp eax, edi
jae 0x41f8e0
mov dword [esi + ecx*4], 0
jmp 0x41f8e5
sub eax, edi
mov dword [esi + ecx*4], eax
inc ecx
sub edx, 1
jne 0x41f8d0
sub dword [esp + 0x24], 1
jne 0x41f8c6
mov edx, dword [ebx + 0x90]
cmp edx, 1
je 0x41f91e
mov ecx, dword [ebx + 0x7c]
mov esi, dword [ebx + 0x20c]
mov eax, 1
shl eax, cl
cmp edx, 6
jne 0x41f919
call fcn.0041e060
jmp 0x41f91e
call fcn.0041e020
mov ecx, dword [ebx + 0x200]
test ecx, ecx
je 0x41f974
mov esi, dword [ebx + 0x208]
mov eax, 1
shl eax, cl
xor ecx, ecx
cdq
and edx, 0xf
add eax, edx
sar eax, 4
test eax, eax
jle 0x41f974
mov ebp, eax
mov edx, 0x10
jmp 0x41f950
mov eax, dword [esi + ecx*4]
cmp eax, edi
jae 0x41f960
mov dword [esi + ecx*4], 0
jmp 0x41f965
sub eax, edi
mov dword [esi + ecx*4], eax
inc ecx
sub edx, 1
jne 0x41f950
sub ebp, 1
jne 0x41f946
mov ebp, dword [esp + 0x1c]
mov eax, dword [ebx + 0x1f8]
cmp eax, edi
jae 0x41f988
xor eax, eax
mov dword [ebx + 0x1f8], eax
jmp 0x41f992
sub eax, edi
mov dword [ebx + 0x1f8], eax
xor eax, eax
mov dword [ebx + 0x1f4], eax
mov dword [ebx + 0x250], eax
mov eax, dword [esp + 0x14]
sub eax, dword [ebx + 0x1e4]
lea ecx, [ebx + 0x1f4]
add eax, ebp
lea esi, [ebx + 0x250]
test ecx, ecx
je 0x41f9be
mov edx, dword [ecx]
jmp 0x41f9c0
xor edx, edx
mov edi, dword [esp + 0x20]
add edx, edi
cmp eax, edx
jbe 0x41fa02
sub eax, edi
cmp dword [ebx + 0x1f0], eax
jae 0x41f9da
mov dword [ebx + 0x1f0], eax
mov eax, dword [ebx + 0x1f0]
cmp dword [ebx + 0x1ec], eax
jae 0x41f9ee
mov dword [ebx + 0x1ec], eax
test ecx, ecx
je 0x41f9f8
mov dword [ecx], 0
test esi, esi
je 0x41fa02
mov dword [esi], 0
mov eax, dword [ebx + 0x1f0]
cmp dword [ebx + 0x1f8], eax
jae 0x41fa16
mov dword [ebx + 0x1f8], eax
mov eax, dword [esp + 0x48]
mov edi, dword [esp + 0x10]
add eax, 0xfffffffd
push ebp
push eax
mov eax, dword [esp + 0x1c]
add edi, 3
push edi
mov esi, ebx
call fcn.0041f520
add esp, 0xc
cmp eax, 0xffffff88
ja 0x41f7e3
mov ecx, dword [esp + 0x28]
test eax, eax
jne 0x41fa6b
lea esi, [ebp + 3]
lea eax, [ecx + ebp*8]
cmp esi, dword [esp + 0x48]
ja 0x41faa4
mov edx, dword [esp + 0x10]
mov dword [edx], eax
mov eax, dword [esp + 0x14]
push ebp
push eax
push edi
call fcn.005e0900
add esp, 0xc
mov eax, esi
jmp 0x41fa81
mov edi, dword [esp + 0x10]
lea esi, [ecx + eax*8 + 4]
mov edx, esi
shr edx, 0x10
mov word [edi], si
mov byte [edi + 2], dl
add eax, 3
mov ecx, dword [esp + 0x18]
add dword [esp + 0x14], ebp
add dword [esp + 0x10], eax
sub dword [esp + 0x48], eax
sub ecx, ebp
mov dword [esp + 0x18], ecx
test ecx, ecx
jne 0x41f7f0
jmp 0x41f7c4
pop edi
pop esi
mov eax, 0xffffffba
pop ebp
add esp, 0x34
ret