Function at 0x500bd0
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, 0xc4
push ebp
mov ebp, dword [esp + 0xd0]
push edi
mov edi, dword [esp + 0xdc]
push eax
push ecx
mov ecx, dword [esp + 0xf0]
lea eax, [esp + 0x80]
push edx
mov edx, dword [esp + 0xf0]
push eax
push ecx
push edx
push ebp
push edi
call fcn.00547180
add esp, 0x20
test eax, eax
je 0x500c29
pop edi
mov eax, 1
pop ebp
add esp, 0xc4
ret
mov edi, dword [edi + 8]
mov edx, dword [ebp + 8]
mov eax, dword [esp + 0x94]
mov ecx, dword [esp + 0x90]
mov dword [esp + 8], edi
mov edi, dword [esp + 0x80]
push ebx
push esi
mov esi, dword [esp + 0x94]
imul edi, edx
mov ebx, dword [esp + 0x84]
sub eax, esi
mov esi, dword [esp + 0xa0]
mov dword [esp + 0x54], eax
sub esi, ecx
imul ecx, dword [esp + 0x10]
lea edi, [edi + ebx*4]
mov dword [esp + 0x64], edx
add edi, dword [ebp + 4]
mov ebp, dword [esp + 0x94]
lea ecx, [ecx + ebp*4]
mov ebp, dword [esp + 0xe4]
add ecx, dword [ebp + 4]
cmp byte [esp + 0x80], 0
mov dword [esp + 0x14], ecx
je 0x500fec
mov ebp, eax
mov edx, eax
sar ebp, 3
mov dword [esp + 0x74], ebp
mov ebp, dword [esp + 0x8c]
and edx, 7
sub ebx, ebp
mov ebp, dword [esp + 0x64]
add ebx, edx
mov dword [esp + 0x68], edx
lea ebx, [ebp + ebx*4]
mov dword [esp + 0x7c], ebx
mov ebx, edx
sub ebx, eax
mov eax, dword [esp + 0x10]
test esi, esi
lea eax, [eax + ebx*4]
mov dword [esp + 0x78], eax
jle 0x501178
mov dword [esp + 0x64], esi
mov ebx, 0xff
mov eax, dword [esp + 0x74]
test eax, eax
jle 0x500f60
mov esi, dword [esp + 0xe8]
lea ebp, [ecx + 8]
shl esi, 8
mov dword [esp + 0x10], eax
mov eax, dword [edi]
mov dword [esp + 0x5c], eax
and eax, ebx
mov dl, byte [eax + esi + 0xa2ee04]
mov eax, dword [esp + 0x5d]
and eax, ebx
mov byte [esp + 0x5c], dl
mov dl, byte [eax + esi + 0xa2ee04]
mov eax, dword [esp + 0x5e]
and eax, ebx
mov byte [esp + 0x5d], dl
mov byte [esp + 0x5f], bl
mov dl, byte [eax + esi + 0xa2ee04]
lea eax, [esp + 0x5c]
push eax
mov byte [esp + 0x62], dl
call fcn.00501190
mov eax, dword [edi + 4]
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 - 4]
mov byte [esp + 0x5a], dl
call fcn.00501190
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.00501190
mov eax, dword [edi + 0xc]
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 + 4]
mov byte [esp + 0x3a], dl
call fcn.00501190
mov eax, dword [edi + 0x10]
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]
mov byte [esp + 0x2d], al
and ecx, ebx
lea eax, [esp + 0x2c]
push eax
mov byte [esp + 0x33], bl
mov dl, byte [ecx + esi + 0xa2ee04]
lea ecx, [ebp + 8]
mov byte [esp + 0x32], dl
call fcn.00501190
mov eax, dword [edi + 0x14]
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 + 0xc]
mov byte [esp + 0x42], dl
call fcn.00501190
mov eax, dword [edi + 0x18]
mov dword [esp + 0x24], eax
mov edx, dword [esp + 0x25]
and eax, ebx
and edx, ebx
mov cl, byte [eax + esi + 0xa2ee04]
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x24], cl
mov ecx, dword [esp + 0x26]
and ecx, ebx
mov byte [esp + 0x25], al
lea eax, [esp + 0x24]
mov byte [esp + 0x27], bl
mov dl, byte [ecx + esi + 0xa2ee04]
push eax
lea ecx, [ebp + 0x10]
mov byte [esp + 0x2a], dl
call fcn.00501190
mov eax, dword [edi + 0x1c]
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 ecx, dword [esp + 0x4e]
and ecx, ebx
mov byte [esp + 0x4d], al
lea eax, [esp + 0x4c]
mov byte [esp + 0x4f], bl
mov dl, byte [ecx + esi + 0xa2ee04]
push eax
lea ecx, [ebp + 0x14]
mov byte [esp + 0x52], dl
call fcn.00501190
mov eax, dword [esp + 0x14]
add ebp, 0x20
add eax, 0x20
add edi, 0x20
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
dec eax
mov dword [esp + 0x10], eax
jne 0x500d05
mov edx, dword [esp + 0x68]
test edx, edx
jle 0x500fc0
mov ebp, edi
mov esi, ecx
sub ebp, ecx
mov dword [esp + 0x18], edx
mov ecx, dword [esi + ebp]
mov edx, dword [esp + 0xe8]
mov dword [esp + 0x1c], ecx
push edx
lea ecx, [esp + 0x20]
call fcn.005003c0
mov ecx, dword [esp + 0x1f]
mov eax, dword [esp + 0x1c]
and ecx, ebx
mov dword [esp + 0x10], eax
push ecx
lea ecx, [esp + 0x14]
call fcn.004f92c0
lea edx, [esp + 0x10]
mov ecx, esi
push edx
call fcn.004f8d00
mov eax, dword [esp + 0x18]
add esi, 4
dec eax
mov dword [esp + 0x18], eax
jne 0x500f6e
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x68]
mov ebp, dword [esp + 0x78]
mov esi, dword [esp + 0x7c]
mov eax, dword [esp + 0x64]
add ecx, ebp
add edi, esi
dec eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x64], eax
jne 0x500ce8
pop esi
pop ebx
pop edi
xor eax, eax
pop ebp
add esp, 0xc4
ret
mov ebx, dword [esp + 0xc0]
imul edx, dword [esp + 0xd0]
shl ebx, 2
mov dword [esp + 0x34], ebx
mov ebx, dword [esp + 0xb4]
mov dword [esp + 0x24], ebx
mov ebx, dword [esp + 0xb8]
mov dword [esp + 0x3c], ebx
mov ebx, dword [esp + 0xc8]
mov ebp, dword [esp + 0xc4]
mov dword [esp + 0x7c], ebx
mov ebx, dword [esp + 0xbc]
mov dword [esp + 0x44], edx
mov dword [esp + 0x2c], ebx
mov ebx, dword [esp + 0xcc]
test esi, esi
mov dword [esp + 0x4c], ebx
jle 0x501178
mov dword [esp + 0x74], esi
mov ebx, 0xff
jmp 0x50105b
mov ebp, dword [esp + 0x68]
add ebp, dword [esp + 0x7c]
mov dword [esp + 0x68], ebp
js 0x501075
mov esi, dword [esp + 0x64]
add edi, esi
mov esi, dword [esp + 0x4c]
sub ebp, esi
mov dword [esp + 0x68], ebp
mov esi, dword [esp + 0x24]
mov dword [esp + 0x5c], edi
test eax, eax
mov dword [esp + 0x18], esi
jle 0x501158
mov esi, dword [esp + 0xe8]
mov ebp, ecx
shl esi, 8
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x3c]
add eax, ecx
mov dword [esp + 0x18], eax
js 0x5010b6
mov ecx, dword [esp + 0x2c]
add edi, 4
sub eax, ecx
mov dword [esp + 0x18], eax
mov eax, dword [edi]
mov dword [esp + 0x6c], eax
mov ecx, dword [esp + 0x6d]
and eax, ebx
and ecx, ebx
mov al, byte [eax + esi + 0xa2ee04]
mov dl, byte [ecx + esi + 0xa2ee04]
mov byte [esp + 0x6c], al
mov eax, dword [esp + 0x6e]
and eax, ebx
mov byte [esp + 0x6d], dl
mov byte [esp + 0x6f], bl
mov cl, byte [eax + esi + 0xa2ee04]
mov byte [esp + 0x6e], cl
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x1c], eax
and eax, ebx
mov dl, byte [eax + 0xa3ed04]
mov eax, dword [esp + 0x1d]
and eax, ebx
mov byte [esp + 0x1c], dl
mov edx, dword [esp + 0x1e]
mov byte [esp + 0x1f], 0
mov cl, byte [eax + 0xa3ed04]
and edx, ebx
mov byte [esp + 0x1d], cl
lea ecx, [esp + 0x1c]
mov al, byte [edx + 0xa3ed04]
push ecx
mov ecx, ebp
mov byte [esp + 0x22], al
call fcn.004f8d00
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x78]
add edi, edx
add ebp, 4
dec eax
mov dword [esp + 0x78], eax
jne 0x501099
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x54]
mov esi, dword [esp + 0x5c]
mov ebp, dword [esp + 0x10]
add ecx, ebp
lea edi, [esi + edx]
mov esi, dword [esp + 0x74]
dec esi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x74], esi
jne 0x501057
pop esi
pop ebx
pop edi
xor eax, eax
pop ebp
add esp, 0xc4
ret