Function at 0x502a60
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, 0xbc
push ebp
mov ebp, dword [esp + 0xd0]
push esi
mov esi, dword [esp + 0xcc]
push eax
push ecx
mov ecx, dword [esp + 0xe8]
lea eax, [esp + 0x78]
push edx
mov edx, dword [esp + 0xe8]
push eax
push ecx
push edx
push esi
push ebp
call fcn.00547180
add esp, 0x20
test eax, eax
je 0x502ab6
pop esi
mov eax, 1
pop ebp
add esp, 0xbc
ret
mov edx, dword [esi + 8]
mov eax, dword [esp + 0x8c]
push ebx
mov ebx, dword [esp + 0x88]
push edi
mov edi, dword [ebp + 8]
mov ecx, dword [esp + 0x98]
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x80]
sub eax, ebx
mov ebx, dword [esp + 0x90]
imul edi, edx
sub ecx, ebx
imul ebx, dword [esp + 0x10]
mov dword [esp + 0x58], edx
mov edx, dword [esp + 0x7c]
mov dword [esp + 0x3c], eax
lea edi, [edi + edx*4]
add edi, dword [esi + 4]
mov esi, dword [esp + 0x8c]
lea ebx, [ebx + esi*4]
mov esi, dword [ebp + 4]
add ebx, esi
cmp byte [esp + 0x78], 0
mov dword [esp + 0x6c], ebx
je 0x502ef2
mov esi, eax
mov ebp, eax
sar esi, 3
mov dword [esp + 0x68], esi
mov esi, dword [esp + 0x84]
and ebp, 7
sub edx, esi
mov esi, dword [esp + 0x58]
add edx, ebp
mov dword [esp + 0x54], ebp
lea edx, [esi + edx*4]
mov dword [esp + 0x74], edx
mov edx, ebp
sub edx, eax
mov eax, dword [esp + 0x10]
test ecx, ecx
lea edx, [eax + edx*4]
mov dword [esp + 0x70], edx
jle 0x503083
mov dword [esp + 0x58], ecx
mov eax, dword [esp + 0x68]
test eax, eax
jle 0x502e52
mov esi, dword [esp + 0xe0]
lea ebp, [ebx + 8]
shl esi, 8
mov dword [esp + 0x10], eax
mov eax, dword [edi]
mov dword [esp + 0x34], eax
mov ecx, dword [esp + 0x36]
and ecx, 0xff
mov dl, byte [ecx + esi + 0xa2ee04]
mov byte [esp + 0x36], dl
mov eax, dword [esp + 0x35]
and eax, 0xff
mov cl, byte [eax + esi + 0xa2ee04]
mov byte [esp + 0x35], cl
mov edx, dword [esp + 0x34]
and edx, 0xff
lea ecx, [esp + 0x34]
push ecx
mov ecx, ebx
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x3b], 0
mov byte [esp + 0x38], al
call fcn.004f8d00
mov edx, dword [edi + 4]
mov dword [esp + 0x4c], edx
mov eax, dword [esp + 0x4e]
and eax, 0xff
mov cl, byte [eax + esi + 0xa2ee04]
mov byte [esp + 0x4e], cl
mov edx, dword [esp + 0x4d]
and edx, 0xff
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x4d], al
mov ecx, dword [esp + 0x4c]
and ecx, 0xff
lea eax, [esp + 0x4c]
push eax
mov byte [esp + 0x53], 0
mov dl, byte [ecx + esi + 0xa2ee04]
lea ecx, [ebp - 4]
mov byte [esp + 0x50], dl
call fcn.004f8d00
mov ecx, dword [edi + 8]
mov dword [esp + 0x3c], ecx
mov edx, dword [esp + 0x3e]
and edx, 0xff
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x3e], al
mov ecx, dword [esp + 0x3d]
and ecx, 0xff
mov dl, byte [ecx + esi + 0xa2ee04]
mov byte [esp + 0x3d], dl
mov eax, dword [esp + 0x3c]
and eax, 0xff
lea edx, [esp + 0x3c]
push edx
mov byte [esp + 0x43], 0
mov cl, byte [eax + esi + 0xa2ee04]
mov byte [esp + 0x40], cl
mov ecx, ebp
call fcn.004f8d00
mov eax, dword [edi + 0xc]
mov dword [esp + 0x2c], eax
mov ecx, dword [esp + 0x2e]
and ecx, 0xff
mov dl, byte [ecx + esi + 0xa2ee04]
mov byte [esp + 0x2e], dl
mov eax, dword [esp + 0x2d]
and eax, 0xff
mov cl, byte [eax + esi + 0xa2ee04]
mov byte [esp + 0x2d], cl
mov edx, dword [esp + 0x2c]
and edx, 0xff
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [ebp + 4]
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x33], 0
mov byte [esp + 0x30], al
call fcn.004f8d00
mov edx, dword [edi + 0x10]
mov dword [esp + 0x44], edx
mov eax, dword [esp + 0x46]
and eax, 0xff
mov cl, byte [eax + esi + 0xa2ee04]
mov byte [esp + 0x46], cl
mov edx, dword [esp + 0x45]
and edx, 0xff
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x45], al
mov ecx, dword [esp + 0x44]
and ecx, 0xff
lea eax, [esp + 0x44]
push eax
mov byte [esp + 0x4b], 0
mov dl, byte [ecx + esi + 0xa2ee04]
lea ecx, [ebp + 8]
mov byte [esp + 0x48], dl
call fcn.004f8d00
mov ecx, dword [edi + 0x14]
mov dword [esp + 0x24], ecx
mov edx, dword [esp + 0x26]
and edx, 0xff
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x26], al
mov ecx, dword [esp + 0x25]
and ecx, 0xff
mov dl, byte [ecx + esi + 0xa2ee04]
mov byte [esp + 0x25], dl
mov eax, dword [esp + 0x24]
and eax, 0xff
lea edx, [esp + 0x24]
push edx
mov byte [esp + 0x2b], 0
mov cl, byte [eax + esi + 0xa2ee04]
mov byte [esp + 0x28], cl
lea ecx, [ebp + 0xc]
call fcn.004f8d00
mov eax, dword [edi + 0x18]
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x1e]
and ecx, 0xff
mov dl, byte [ecx + esi + 0xa2ee04]
mov byte [esp + 0x1e], dl
mov eax, dword [esp + 0x1d]
and eax, 0xff
mov cl, byte [eax + esi + 0xa2ee04]
mov byte [esp + 0x1d], cl
mov edx, dword [esp + 0x1c]
and edx, 0xff
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [ebp + 0x10]
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x23], 0
mov byte [esp + 0x20], al
call fcn.004f8d00
mov edx, dword [edi + 0x1c]
mov dword [esp + 0x14], edx
mov eax, dword [esp + 0x16]
and eax, 0xff
mov cl, byte [eax + esi + 0xa2ee04]
mov byte [esp + 0x16], cl
mov edx, dword [esp + 0x15]
and edx, 0xff
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x15], al
mov ecx, dword [esp + 0x14]
and ecx, 0xff
lea eax, [esp + 0x14]
push eax
mov byte [esp + 0x1b], 0
mov dl, byte [ecx + esi + 0xa2ee04]
lea ecx, [ebp + 0x14]
mov byte [esp + 0x18], dl
call fcn.004f8d00
mov eax, dword [esp + 0x10]
add ebx, 0x20
add ebp, 0x20
add edi, 0x20
dec eax
mov dword [esp + 0x10], eax
jne 0x502b81
mov ebp, dword [esp + 0x54]
test ebp, ebp
jle 0x502eca
mov eax, edi
mov esi, ebx
sub eax, ebx
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x6c], eax
jmp 0x502e6a
mov eax, dword [esp + 0x6c]
mov ecx, dword [eax + esi]
mov edx, dword [esp + 0xe0]
mov dword [esp + 0x10], ecx
push edx
lea ecx, [esp + 0x14]
call fcn.004f8cc0
mov eax, dword [esi]
mov edx, dword [esp + 0x10]
mov ebp, eax
mov ecx, eax
xor ebp, edx
and ecx, edx
and ebp, 0xfefefe
add esi, 4
lea ecx, [ebp + ecx*2]
shr ecx, 8
and ecx, 0x10101
add ecx, 0x7f7f7f
xor ecx, 0x7f7f7f
sub eax, ecx
add eax, edx
or eax, ecx
mov dword [esi - 4], eax
mov eax, dword [esp + 0x5c]
dec eax
mov dword [esp + 0x5c], eax
jne 0x502e66
mov ebp, dword [esp + 0x54]
mov edx, dword [esp + 0x70]
mov ecx, dword [esp + 0x74]
mov eax, dword [esp + 0x58]
add ebx, edx
add edi, ecx
dec eax
mov dword [esp + 0x58], eax
jne 0x502b64
pop edi
pop ebx
pop esi
xor eax, eax
pop ebp
add esp, 0xbc
ret
mov edx, dword [esp + 0xb8]
mov esi, dword [esp + 0xac]
shl edx, 2
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0xb0]
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x58]
imul edx, dword [esp + 0xc8]
mov dword [esp + 0x24], esi
mov esi, dword [esp + 0xc0]
mov dword [esp + 0x74], esi
mov esi, dword [esp + 0xb4]
mov dword [esp + 0x44], esi
mov esi, dword [esp + 0xc4]
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0xbc]
test ecx, ecx
mov dword [esp + 0x4c], edx
mov dword [esp + 0x54], esi
jle 0x503083
mov dword [esp + 0x68], ecx
mov ecx, dword [esp + 0x54]
mov esi, dword [esp + 0x74]
add ecx, esi
mov dword [esp + 0x54], ecx
js 0x502f7e
mov ebp, dword [esp + 0x58]
mov esi, dword [esp + 0x14]
add edi, ebp
sub ecx, esi
mov dword [esp + 0x54], ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x34], edi
test eax, eax
mov dword [esp + 0x5c], ecx
jle 0x503063
mov edx, dword [esp + 0xe0]
mov ebp, ebx
shl edx, 8
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x24]
add eax, ecx
mov dword [esp + 0x5c], eax
js 0x502fbf
mov ecx, dword [esp + 0x44]
add edi, 4
sub eax, ecx
mov dword [esp + 0x5c], eax
mov eax, dword [edi]
add ebp, 4
mov dword [esp + 0x60], eax
mov ecx, dword [esp + 0x62]
and ecx, 0xff
mov al, byte [ecx + edx + 0xa2ee04]
mov byte [esp + 0x62], al
mov ecx, dword [esp + 0x61]
and ecx, 0xff
mov al, byte [ecx + edx + 0xa2ee04]
mov byte [esp + 0x61], al
mov ecx, dword [esp + 0x60]
and ecx, 0xff
mov byte [esp + 0x63], 0
mov al, byte [ecx + edx + 0xa2ee04]
mov byte [esp + 0x60], al
mov eax, dword [ebp - 4]
mov esi, dword [esp + 0x60]
mov ebx, eax
mov ecx, eax
xor ebx, esi
and ecx, esi
and ebx, 0xfefefe
lea ecx, [ebx + ecx*2]
shr ecx, 8
and ecx, 0x10101
add ecx, 0x7f7f7f
xor ecx, 0x7f7f7f
sub eax, ecx
add eax, esi
mov esi, dword [esp + 0x2c]
or eax, ecx
add edi, esi
mov dword [ebp - 4], eax
mov eax, dword [esp + 0x70]
dec eax
mov dword [esp + 0x70], eax
jne 0x502fa2
mov eax, dword [esp + 0x3c]
mov ebx, dword [esp + 0x6c]
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x34]
mov esi, dword [esp + 0x10]
add ebx, esi
lea edi, [ecx + edx]
mov ecx, dword [esp + 0x68]
dec ecx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x68], ecx
jne 0x502f5e
pop edi
pop ebx
pop esi
xor eax, eax
pop ebp
add esp, 0xbc
ret