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

Disassembly:
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
sub esp, 0xc0
push ebx
mov ebx, dword [esp + 0xd4]
push ebp
mov ebp, dword [esp + 0xd0]
push eax
push ecx
mov ecx, dword [esp + 0xec]
lea eax, [esp + 0x7c]
push edx
mov edx, dword [esp + 0xec]
push eax
push ecx
push edx
push ebp
push ebx
call fcn.00547180
add esp, 0x20
test eax, eax
je 0x4ffe46
pop ebp
mov eax, 1
pop ebx
add esp, 0xc0
ret
mov ebx, dword [ebx + 8]
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x6c], ebx
mov ebx, dword [esp + 0x84]
imul ebx, edi
mov esi, dword [esp + 0x9c]
mov eax, dword [esp + 0x94]
mov dword [esp + 0x24], ebx
mov ebx, dword [esp + 0x80]
mov dword [esp + 0x20], edi
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x98]
mov edx, dword [esp + 0x90]
lea edi, [edi + ebx*4]
sub esi, eax
add edi, dword [ebp + 4]
mov ebp, dword [esp + 0x6c]
imul eax, ebp
sub ecx, edx
lea edx, [edx + edx*2]
add eax, edx
mov edx, dword [esp + 0xe0]
mov dword [esp + 0x44], ecx
add eax, dword [edx + 4]
mov dword [esp + 0x18], eax
mov al, byte [esp + 0x7c]
test al, al
je 0x50021a
mov eax, ecx
mov edx, ecx
sar eax, 3
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x88]
and edx, 7
sub ebx, eax
mov eax, dword [esp + 0x20]
add ebx, edx
mov dword [esp + 0x64], edx
lea eax, [eax + ebx*4]
mov dword [esp + 0x6c], eax
mov eax, edx
sub eax, ecx
lea ecx, [ebp + eax*2]
add eax, ecx
test esi, esi
mov dword [esp + 0x24], eax
jle 0x5003b1
mov dword [esp + 0x68], esi
mov ebx, 0xff
mov eax, dword [esp + 0x28]
test eax, eax
jle 0x500182
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0xe4]
shl esi, 8
lea ebp, [edx + 6]
mov dword [esp + 0x1c], eax
mov eax, dword [edi]
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x11]
and eax, ebx
and edx, ebx
mov cl, byte [eax + esi + 0xa2ee04]
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x10], cl
mov ecx, dword [esp + 0x12]
and ecx, ebx
mov byte [esp + 0x11], al
lea eax, [esp + 0x10]
mov byte [esp + 0x13], bl
mov dl, byte [ecx + esi + 0xa2ee04]
mov ecx, dword [esp + 0x18]
push eax
mov byte [esp + 0x16], dl
call fcn.00500400
mov eax, dword [edi + 4]
mov dword [esp + 0x3c], eax
mov edx, dword [esp + 0x3d]
and eax, ebx
and edx, ebx
mov cl, byte [eax + esi + 0xa2ee04]
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x3c], cl
mov ecx, dword [esp + 0x3e]
and ecx, ebx
mov byte [esp + 0x3d], al
lea eax, [esp + 0x3c]
mov byte [esp + 0x3f], bl
mov dl, byte [ecx + esi + 0xa2ee04]
push eax
lea ecx, [ebp - 3]
mov byte [esp + 0x42], dl
call fcn.00500400
mov eax, dword [edi + 8]
mov dword [esp + 0x44], eax
mov edx, dword [esp + 0x45]
and eax, ebx
and edx, ebx
mov cl, byte [eax + esi + 0xa2ee04]
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x44], cl
mov ecx, dword [esp + 0x46]
and ecx, ebx
mov byte [esp + 0x45], al
lea eax, [esp + 0x44]
mov byte [esp + 0x47], bl
mov dl, byte [ecx + esi + 0xa2ee04]
push eax
mov ecx, ebp
mov byte [esp + 0x4a], dl
call fcn.00500400
mov eax, dword [edi + 0xc]
mov dword [esp + 0x5c], eax
mov edx, dword [esp + 0x5d]
and eax, ebx
and edx, ebx
mov cl, byte [eax + esi + 0xa2ee04]
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x5c], cl
mov ecx, dword [esp + 0x5e]
and ecx, ebx
mov byte [esp + 0x5d], al
lea eax, [esp + 0x5c]
mov byte [esp + 0x5f], bl
mov dl, byte [ecx + esi + 0xa2ee04]
push eax
lea ecx, [ebp + 3]
mov byte [esp + 0x62], dl
call fcn.00500400
mov eax, dword [edi + 0x10]
mov dword [esp + 0x4c], eax
mov edx, dword [esp + 0x4d]
and eax, ebx
and edx, ebx
mov cl, byte [eax + esi + 0xa2ee04]
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x4c], cl
mov byte [esp + 0x4d], al
mov ecx, dword [esp + 0x4e]
lea eax, [esp + 0x4c]
and ecx, ebx
push eax
mov byte [esp + 0x53], bl
mov dl, byte [ecx + esi + 0xa2ee04]
lea ecx, [ebp + 6]
mov byte [esp + 0x52], dl
call fcn.00500400
mov eax, dword [edi + 0x14]
mov dword [esp + 0x34], eax
mov edx, dword [esp + 0x35]
and eax, ebx
and edx, ebx
mov cl, byte [eax + esi + 0xa2ee04]
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x34], cl
mov ecx, dword [esp + 0x36]
and ecx, ebx
mov byte [esp + 0x35], al
lea eax, [esp + 0x34]
mov byte [esp + 0x37], bl
mov dl, byte [ecx + esi + 0xa2ee04]
push eax
lea ecx, [ebp + 9]
mov byte [esp + 0x3a], dl
call fcn.00500400
mov eax, dword [edi + 0x18]
mov dword [esp + 0x2c], eax
mov edx, dword [esp + 0x2d]
and eax, ebx
and edx, ebx
mov cl, byte [eax + esi + 0xa2ee04]
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x2c], cl
mov ecx, dword [esp + 0x2e]
and ecx, ebx
mov byte [esp + 0x2d], al
lea eax, [esp + 0x2c]
mov byte [esp + 0x2f], bl
mov dl, byte [ecx + esi + 0xa2ee04]
push eax
lea ecx, [ebp + 0xc]
mov byte [esp + 0x32], dl
call fcn.00500400
mov eax, dword [edi + 0x1c]
mov dword [esp + 0x54], eax
mov edx, dword [esp + 0x55]
and eax, ebx
and edx, ebx
mov cl, byte [eax + esi + 0xa2ee04]
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x54], cl
mov ecx, dword [esp + 0x56]
and ecx, ebx
mov byte [esp + 0x55], al
lea eax, [esp + 0x54]
mov byte [esp + 0x57], bl
mov dl, byte [ecx + esi + 0xa2ee04]
push eax
lea ecx, [ebp + 0xf]
mov byte [esp + 0x5a], dl
call fcn.00500400
mov eax, dword [esp + 0x18]
add ebp, 0x18
add eax, 0x18
add edi, 0x20
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1c]
dec eax
mov dword [esp + 0x1c], eax
jne 0x4fff27
mov edx, dword [esp + 0x64]
test edx, edx
jle 0x5001ea
mov ebp, dword [esp + 0x18]
mov esi, edi
mov dword [esp + 0x1c], edx
mov ecx, dword [esi]
mov edx, dword [esp + 0xe4]
mov dword [esp + 0x70], ecx
push edx
lea ecx, [esp + 0x74]
call fcn.005003c0
mov edx, dword [esp + 0x73]
mov cl, byte [esp + 0x72]
mov ax, word [esp + 0x70]
and edx, ebx
mov byte [esp + 0x22], cl
push edx
lea ecx, [esp + 0x24]
mov word [esp + 0x24], ax
call fcn.004f8650
lea eax, [esp + 0x20]
mov ecx, ebp
push eax
call fcn.004f86a0
mov eax, dword [esp + 0x1c]
add esi, 4
add ebp, 3
dec eax
mov dword [esp + 0x1c], eax
jne 0x500190
mov edx, dword [esp + 0x64]
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x68]
add esi, ecx
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x18], esi
add edi, ecx
dec eax
mov dword [esp + 0x68], eax
jne 0x4fff06
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc0
ret
mov edx, dword [esp + 0xbc]
lea eax, [edx*4]
mov edx, dword [esp + 0xb0]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x20]
imul eax, dword [esp + 0xcc]
mov dword [esp + 0x54], edx
mov edx, dword [esp + 0xb4]
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0xc4]
mov dword [esp + 0x78], edx
mov edx, dword [esp + 0xb8]
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0xc8]
mov dword [esp + 0x70], edx
mov edx, dword [esp + 0xc0]
test esi, esi
mov dword [esp + 0x5c], eax
jle 0x5003b1
mov dword [esp + 0x24], esi
mov ebx, 0xff
jmp 0x500291
mov edx, dword [esp + 0x68]
add edx, dword [esp + 0x78]
mov dword [esp + 0x68], edx
js 0x5002ab
mov esi, dword [esp + 0x20]
add edi, esi
mov esi, dword [esp + 0x70]
sub edx, esi
mov dword [esp + 0x68], edx
mov edx, dword [esp + 0x54]
mov dword [esp + 0x3c], edi
test ecx, ecx
mov dword [esp + 0x1c], edx
jle 0x500391
mov esi, dword [esp + 0xe4]
mov ebp, dword [esp + 0x18]
shl esi, 8
mov dword [esp + 0x64], ecx
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
add eax, ecx
mov dword [esp + 0x1c], eax
js 0x5002ee
mov ecx, dword [esp + 0x34]
add edi, 4
sub eax, ecx
mov dword [esp + 0x1c], eax
mov eax, dword [edi]
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x11]
and eax, ebx
and ecx, ebx
mov al, byte [eax + esi + 0xa2ee04]
mov dl, byte [ecx + esi + 0xa2ee04]
mov byte [esp + 0x10], al
mov eax, dword [esp + 0x12]
and eax, ebx
mov byte [esp + 0x11], dl
mov cx, word [esp + 0x10]
mov al, byte [eax + esi + 0xa2ee04]
mov word [esp + 0x28], cx
mov byte [esp + 0x12], al
mov edx, dword [esp + 0x12]
mov ecx, dword [esp + 0x11]
and edx, ebx
mov byte [esp + 0x2a], al
and ecx, ebx
mov al, byte [edx + 0xa3ed04]
mov dl, byte [ecx + 0xa3ed04]
push eax
mov eax, dword [esp + 0x14]
push edx
and eax, ebx
mov cl, byte [eax + 0xa3ed04]
push ecx
lea ecx, [esp + 0x34]
call fcn.004d9c90
lea edx, [esp + 0x28]
mov ecx, ebp
push edx
call fcn.004f86a0
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x64]
add edi, edx
add ebp, 3
dec eax
mov dword [esp + 0x64], eax
jne 0x5002d1
mov eax, dword [esp + 0x5c]
mov ebp, dword [esp + 0x6c]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x3c]
mov esi, dword [esp + 0x18]
add esi, ebp
lea edi, [edx + eax]
mov edx, dword [esp + 0x24]
dec edx
mov dword [esp + 0x18], esi
mov dword [esp + 0x24], edx
jne 0x50028d
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc0
ret