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

Disassembly:
sub esp, 0x4c
mov eax, dword [esp + 0x54]
push ebx
push ebp
mov ebp, ecx
mov ecx, dword [esp + 0x68]
push esi
cmp eax, ecx
push edi
mov dword [esp + 0x10], ebp
jne 0x508955
mov ecx, dword [esp + 0x68]
mov eax, dword [esp + 0x74]
cmp ecx, eax
jne 0x508955
mov edx, dword [esp + 0x6c]
mov eax, dword [esp + 0x78]
cmp edx, eax
je 0x508d2d
lea eax, [esp + 0x40]
mov ecx, ebp
push eax
call fcn.0050a860
mov esi, dword [eax]
lea edx, [esp + 0x40]
xor ebx, ebx
push edx
mov edi, dword [eax + 4]
mov ecx, dword [eax + 8]
mov dword [esp + 0x44], ebx
mov dword [esp + 0x38], ecx
lea ecx, [esp + 0x68]
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
call fcn.004f4470
test eax, eax
jne 0x5089a3
lea eax, [esp + 0x40]
lea ecx, [esp + 0x64]
push eax
call fcn.004f63f0
test eax, eax
je 0x508d20
mov eax, dword [esp + 0x64]
cmp eax, esi
jg 0x508d20
jne 0x5089cf
mov eax, dword [esp + 0x68]
cmp eax, edi
jg 0x508d20
jne 0x5089cf
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x6c]
cmp eax, ecx
jg 0x508d20
lea edx, [esp + 0x40]
lea ecx, [esp + 0x70]
push edx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
call fcn.004f4470
test eax, eax
jne 0x508a03
lea eax, [esp + 0x40]
lea ecx, [esp + 0x70]
push eax
call fcn.004f63f0
test eax, eax
je 0x508d09
mov ecx, dword [esp + 0x70]
cmp ecx, esi
jg 0x508d09
mov ebx, dword [esp + 0x78]
mov edx, dword [esp + 0x74]
jne 0x508a2d
cmp edx, edi
jg 0x508d07
jne 0x508a2d
cmp ebx, dword [esp + 0x34]
jg 0x508d07
mov eax, dword [esp + 0x64]
mov edi, dword [esp + 0x6c]
mov esi, dword [esp + 0x68]
cmp eax, ecx
jg 0x508a4b
cmp eax, ecx
jne 0x508a7d
cmp esi, edx
jg 0x508a4b
jne 0x508a7d
cmp edi, ebx
jle 0x508a7d
mov ebp, eax
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], edi
mov eax, ecx
mov esi, edx
mov edx, dword [esp + 0x44]
mov edi, ebx
mov ebx, dword [esp + 0x48]
mov ecx, ebp
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], esi
mov dword [esp + 0x6c], edi
mov dword [esp + 0x70], ecx
mov dword [esp + 0x74], edx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x2c], edi
mov edi, dword [esp + 0x10]
mov ebp, eax
mov dword [esp + 0x1c], ecx
push eax
mov ecx, edi
mov dword [esp + 0x24], ebp
mov dword [esp + 0x2c], esi
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], ebx
call fcn.00503f90
mov esi, eax
test esi, esi
je 0x508d2d
mov ebx, dword [esp + 0x1c]
mov ecx, edi
push ebx
call fcn.00503f90
test eax, eax
mov dword [esp + 0x14], eax
je 0x508d2d
mov ecx, ebx
mov eax, 1
sub ecx, ebp
mov dword [esp + 0x18], eax
dec ecx
cmp ecx, eax
mov dword [esp + 0x24], ecx
jl 0x508b58
jmp 0x508ae5
mov ebp, dword [esp + 0x20]
mov edi, dword [esp + 0x10]
add eax, ebp
mov ecx, edi
push eax
call fcn.00503f90
test eax, eax
je 0x508b58
lea ecx, [eax + 0x14]
mov ebx, dword [eax + 0x14]
mov edx, dword [ecx + 4]
test edx, edx
mov ebp, dword [ecx + 8]
mov dword [esp + 0x54], ebp
mov ecx, dword [ecx + 0xc]
jge 0x508b0c
xor edx, edx
mov ebp, dword [edi + 0x20]
sub ebp, dword [edi + 0x18]
cmp ecx, ebp
jle 0x508b1e
mov ecx, dword [edi + 0x20]
mov ebp, dword [edi + 0x18]
sub ecx, ebp
mov ebp, dword [esp + 0x7c]
mov edi, dword [eax]
push ebp
sub esp, 0x10
mov ebp, esp
mov dword [ebp], ebx
mov dword [ebp + 4], edx
mov edx, dword [esp + 0x68]
mov dword [ebp + 8], edx
mov dword [ebp + 0xc], ecx
mov ecx, dword [esp + 0x74]
push ecx
mov ecx, eax
call dword [edi + 0xf0]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
inc eax
cmp eax, ecx
mov dword [esp + 0x18], eax
jle 0x508add
mov edx, dword [esp + 0x28]
mov ebx, dword [esi + 0x14]
push edx
mov ecx, esi
call fcn.004dabd0
test eax, eax
je 0x508d2d
mov ecx, dword [esp + 0x2c]
mov ebp, dword [eax + 0x14]
mov edx, dword [eax]
push ecx
mov ecx, dword [esp + 0x64]
add ebx, ebp
push ecx
lea ecx, [esp + 0x34]
push ecx
mov ecx, eax
call dword [edx + 0x304]
mov edx, eax
mov ebp, dword [esi + 0x18]
mov eax, dword [edx]
add ebx, eax
mov eax, dword [esi + 0x20]
mov ecx, dword [edx + 4]
mov edx, dword [esi + 0x1c]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x54], edx
mov edx, dword [esp + 0x3c]
mov edi, dword [ecx + 0x14]
push edx
mov dword [esp + 0x5c], eax
call fcn.004dabd0
test eax, eax
je 0x508d2d
mov ecx, dword [eax + 0x14]
mov edx, dword [eax]
add edi, ecx
mov ecx, dword [esp + 0x40]
push ecx
mov ecx, dword [esp + 0x64]
push ecx
lea ecx, [esp + 0x48]
push ecx
mov ecx, eax
call dword [edx + 0x304]
mov edx, eax
mov eax, dword [edx]
add edi, eax
mov eax, dword [esp + 0x14]
mov ecx, dword [edx + 4]
mov edx, dword [eax + 0x18]
mov dword [esp + 0x30], ecx
mov ecx, dword [eax + 0x14]
mov eax, dword [eax + 0x20]
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x20]
cmp ecx, edx
mov dword [esp + 0x38], eax
jne 0x508c5e
test ebp, ebp
jge 0x508c1a
xor ebp, ebp
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x20]
sub edx, dword [ecx + 0x18]
cmp eax, edx
jle 0x508c30
mov eax, dword [ecx + 0x20]
mov edx, dword [ecx + 0x18]
sub eax, edx
mov ecx, dword [esp + 0x7c]
mov edx, dword [esi]
push ecx
sub esp, 0x10
mov ecx, esp
mov dword [ecx], ebx
mov dword [ecx + 4], ebp
mov dword [ecx + 8], edi
mov dword [ecx + 0xc], eax
mov eax, dword [esp + 0x74]
push eax
mov ecx, esi
call dword [edx + 0xf0]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 0x20
mov eax, dword [esp + 0x58]
test ebp, ebp
jge 0x508c68
xor ebp, ebp
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x20]
sub edx, dword [ecx + 0x18]
cmp eax, edx
jle 0x508c7e
mov eax, dword [ecx + 0x20]
mov edx, dword [ecx + 0x18]
sub eax, edx
mov ecx, dword [esp + 0x7c]
mov edx, dword [esi]
push ecx
mov dword [esp + 0x44], edx
sub esp, 0x10
mov ecx, dword [esp + 0x68]
mov edx, esp
mov dword [edx], ebx
mov ebx, dword [esp + 0x74]
push ebx
mov dword [edx + 4], ebp
mov dword [edx + 8], ecx
mov ecx, esi
mov dword [edx + 0xc], eax
mov edx, dword [esp + 0x58]
call dword [edx + 0xf0]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x38]
test ecx, ecx
jge 0x508cc0
xor ecx, ecx
mov esi, dword [esp + 0x10]
mov ebp, dword [esi + 0x20]
sub ebp, dword [esi + 0x18]
cmp eax, ebp
jle 0x508cd6
mov eax, dword [esi + 0x20]
mov ebp, dword [esi + 0x18]
sub eax, ebp
mov ebp, dword [esp + 0x7c]
mov esi, dword [esp + 0x14]
push ebp
sub esp, 0x10
mov esi, dword [esi]
mov ebp, esp
push ebx
mov dword [ebp], edx
mov dword [ebp + 4], ecx
mov ecx, dword [esp + 0x2c]
mov dword [ebp + 8], edi
mov dword [ebp + 0xc], eax
call dword [esi + 0xf0]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 0x20
xor ebx, ebx
mov eax, dword [esp + 0x60]
push ebx
push eax
mov ecx, ebp
call fcn.00508f40
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 0x20
mov ecx, dword [esp + 0x60]
push ebx
push ecx
mov ecx, ebp
call fcn.00508f40
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 0x20