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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x30
mov eax, dword [ecx + 4]
push ebx
push ebp
push esi
mov esi, dword [ecx + 8]
xor ebx, ebx
mov ebp, dword [eax + 0xc]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x18], ebx
push edi
mov edi, dword [ecx]
mov ecx, dword [eax + 0x3c]
mov dword [esp + 0x34], edi
mov dword [esp + 0x28], ecx
test ebp, ebp
je 0x50908e
mov ebp, dword [ebp]
jmp 0x509090
xor ebp, ebp
mov eax, dword [edi + 0x38]
lea edx, [edi + 0x2c]
mov cl, byte [edi + 0x13]
dec eax
mov dword [esp + 0x18], eax
dec eax
mov dword [edi + 0x38], eax
test cl, cl
jne 0x5090bb
mov eax, dword [edx]
inc eax
mov dword [edx], eax
inc dword [edx]
mov ecx, dword [edx]
mov dword [esp + 0x20], ecx
xor cl, cl
mov dword [esp + 0x14], eax
jmp 0x5090f8
sub cl, 1
movzx eax, cl
mov byte [edi + 0x13], cl
mov eax, dword [edi + eax*4 + 0x98]
mov dword [esp + 0x14], eax
jne 0x5090dd
inc dword [edx]
mov ecx, dword [edx]
mov dword [esp + 0x20], ecx
xor cl, cl
jmp 0x5090f8
dec cl
movzx eax, cl
mov byte [edi + 0x13], cl
mov eax, dword [edi + eax*4 + 0x98]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x14], eax
test ebp, ebp
je 0x50919f
cmp ebp, 1
jne 0x509145
test cl, cl
jne 0x50910f
inc dword [edx]
mov ebx, dword [edx]
jmp 0x50911e
dec cl
movzx eax, cl
mov byte [edi + 0x13], cl
mov ebx, dword [edi + eax*4 + 0x98]
mov dword [esp + 0x24], ebx
test cl, cl
jne 0x509130
inc dword [edx]
mov eax, dword [edx]
mov dword [esp + 0x1c], eax
jmp 0x50919b
dec cl
movzx eax, cl
mov byte [edi + 0x13], cl
mov eax, dword [edi + eax*4 + 0x98]
mov dword [esp + 0x1c], eax
jmp 0x50919b
mov eax, dword [edi + 0x20]
mov ecx, dword [edi + 0x1c]
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], eax
cmp ebp, ecx
jg 0x509168
lea ebx, [eax + ebp]
sub ecx, ebp
mov dword [esp + 0x1c], ebx
mov dword [edi + 0x20], ebx
mov dword [edi + 0x1c], ecx
jmp 0x509179
mov eax, dword [edx]
lea ebx, [eax + 1]
add eax, ebp
mov dword [esp + 0x24], ebx
mov ebx, dword [esp + 0x1c]
mov dword [edx], eax
cmp ebp, ecx
jg 0x50918a
lea eax, [ebx + ebp]
sub ecx, ebp
mov dword [edi + 0x20], eax
mov dword [edi + 0x1c], ecx
jmp 0x509197
mov eax, dword [edx]
lea ecx, [eax + 1]
add eax, ebp
mov dword [esp + 0x1c], ecx
mov dword [edx], eax
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x2c]
mov ecx, dword [esi + 0x74]
mov edx, dword [edx + 0x30]
cmp dword [esi + 0x78], ecx
jg 0x5091c3
push 0
push eax
push edx
mov edx, 0x86
mov ecx, esi
call fcn.00490220
add esp, 0xc
jmp 0x5091f2
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4 + 4], edx
mov edx, dword [esp + 0x14]
mov dword [eax + ecx*4], 0x86
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov ecx, dword [esp + 0x38]
push ebx
mov ebx, dword [esp + 0x30]
mov edx, dword [ebx + 0x30]
call fcn.00508380
add esp, 4
mov ecx, dword [esi + 0x74]
mov edx, dword [ebx + 0x34]
cmp dword [esi + 0x78], ecx
jg 0x509227
push 0
push edx
push 0
mov edx, 0x4a
mov ecx, esi
call fcn.00490220
add esp, 0xc
jmp 0x509256
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4], 0x4a
mov dword [eax + ecx*4 + 4], 0
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov ebx, dword [ebx + 0x24]
test ebx, ebx
jne 0x509206
mov edx, dword [esp + 0x2c]
mov ecx, dword [esi + 0x74]
mov edx, dword [edx + 0x58]
cmp dword [esi + 0x78], ecx
jg 0x509286
mov eax, dword [esp + 0x18]
mov ecx, esi
push edx
dec eax
lea edx, [ebx + 0x19]
push eax
push dword [esp + 0x30]
call fcn.00490220
add esp, 0xc
jmp 0x5092ba
mov ebx, dword [esp + 0x18]
lea eax, [ecx + 1]
mov edi, dword [esp + 0x28]
lea ecx, [ecx + ecx*4]
mov dword [esi + 0x74], eax
dec ebx
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4 + 4], edi
mov edi, dword [esp + 0x34]
mov dword [eax + ecx*4], 0x19
mov dword [eax + ecx*4 + 8], ebx
mov dword [eax + ecx*4 + 0xc], edx
mov dword [eax + ecx*4 + 0x10], 0
mov ebx, dword [esi + 0x74]
mov dword [esp + 0x3c], ebx
cmp dword [esi + 0x78], ebx
jg 0x5092e2
mov edx, dword [esp + 0x20]
mov ecx, esi
push 0
push edx
push dword [esp + 0x30]
mov edx, 0x86
call fcn.00490220
add esp, 0xc
jmp 0x509315
mov edx, dword [esp + 0x28]
lea eax, [ebx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ebx + ebx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4 + 4], edx
mov edx, dword [esp + 0x20]
mov dword [eax + ecx*4], 0x86
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov eax, dword [esp + 0x2c]
mov ecx, dword [esi + 0x74]
mov edx, dword [eax + 0x5c]
cmp dword [esi + 0x78], ecx
jg 0x509344
push dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov ecx, esi
dec eax
push eax
push edx
mov edx, 0x36
call fcn.00490220
mov edx, dword [esp + 0x2c]
add esp, 0xc
jmp 0x509378
mov edi, dword [esp + 0x34]
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4 + 4], edx
mov edx, dword [esp + 0x18]
dec edx
mov dword [eax + ecx*4], 0x36
mov dword [eax + ecx*4 + 8], edx
mov edx, dword [esp + 0x20]
mov dword [eax + ecx*4 + 0xc], edx
mov dword [eax + ecx*4 + 0x10], 0
mov ecx, dword [esp + 0x2c]
mov al, byte [ecx + 0x14]
cmp al, 0x55
jne 0x5093e0
mov ecx, dword [esi + 0x74]
cmp dword [esi + 0x78], ecx
jg 0x5093a8
push edx
push dword [esp + 0x1c]
mov edx, 0x35
mov ecx, esi
push dword [esp + 0x1c]
call fcn.00490220
add esp, 0xc
jmp 0x5095d2
mov edx, dword [esp + 0x14]
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4 + 4], edx
mov edx, dword [esp + 0x18]
mov dword [eax + ecx*4 + 8], edx
mov edx, dword [esp + 0x20]
mov dword [eax + ecx*4], 0x35
mov dword [eax + ecx*4 + 0xc], edx
mov dword [eax + ecx*4 + 0x10], 0
jmp 0x5095d2
cmp al, 0x42
je 0x5095d2
mov edx, dword [ecx + 0xc]
xor ebx, ebx
mov dword [esp + 0x30], ebx
test edx, edx
je 0x509409
push ebx
push ebx
mov ecx, edi
call fcn.004de530
mov ecx, dword [esp + 0x34]
add esp, 8
mov dword [esp + 0x30], eax
cmp byte [ecx + 0x14], 0x5e
jne 0x509467
mov ebx, dword [esi + 0x74]
cmp dword [esi + 0x78], ebx
jg 0x509434
push dword [esp + 0x20]
mov edx, 0x35
mov ecx, esi
push 0
push dword [esp + 0x1c]
call fcn.00490220
add esp, 0xc
mov ebx, eax
jmp 0x509467
mov edx, dword [esp + 0x14]
lea eax, [ebx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ebx + ebx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4 + 4], edx
mov edx, dword [esp + 0x20]
mov dword [eax + ecx*4], 0x35
mov dword [eax + ecx*4 + 8], 0
mov dword [eax + ecx*4 + 0xc], edx
mov dword [eax + ecx*4 + 0x10], 0
cmp dword [esp + 0x30], 0
je 0x509550
push dword [esp + 0x1c]
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x3c]
call fcn.00508380
mov ecx, dword [esi + 0x74]
add esp, 4
cmp dword [esi + 0x78], ecx
jg 0x5094a8
push ebp
push dword [esp + 0x28]
mov edx, 0x59
mov ecx, esi
push dword [esp + 0x24]
call fcn.00490220
add esp, 0xc
jmp 0x5094d7
mov edx, dword [esp + 0x1c]
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4 + 4], edx
mov edx, dword [esp + 0x24]
mov dword [eax + ecx*4], 0x59
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], ebp
mov dword [eax + ecx*4 + 0x10], 0
mov ecx, dword [esi]
cmp byte [ecx + 0x57], 0
je 0x5094f2
push dword [esp + 0x30]
mov edx, 0xfffffff7
call fcn.00490d30
add esp, 4
jmp 0x509508
mov eax, dword [esi + 0x74]
mov edx, dword [esp + 0x30]
lea ecx, [eax + eax*4]
mov eax, dword [esi + 0x70]
mov byte [eax + ecx*4 - 0x13], 0xf7
mov dword [eax + ecx*4 - 4], edx
mov eax, dword [esi + 0x74]
lea edx, [eax + 1]
cmp dword [esi + 0x78], eax
jg 0x50952a
push edx
push dword [esp + 0x1c]
mov ecx, esi
push edx
mov edx, 0x10
call fcn.00490220
add esp, 0xc
jmp 0x5095a4
mov edi, dword [esp + 0x18]
lea ecx, [eax + eax*4]
mov eax, dword [esi + 0x70]
mov dword [esi + 0x74], edx
mov dword [eax + ecx*4 + 8], edi
mov edi, dword [esp + 0x34]
mov dword [eax + ecx*4], 0x10
mov dword [eax + ecx*4 + 4], edx
mov dword [eax + ecx*4 + 0xc], edx
jmp 0x50959c
mov ecx, dword [esi + 0x74]
cmp dword [esi + 0x78], ecx
jg 0x509571
push 0
push dword [esp + 0x1c]
mov edx, 0xb
mov ecx, esi
push 0
call fcn.00490220
add esp, 0xc
jmp 0x5095a4
mov edx, dword [esp + 0x18]
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4], 0xb
mov dword [eax + ecx*4 + 4], 0
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
test ebx, ebx
je 0x5095ce
mov eax, dword [esi]
mov edx, dword [esi + 0x74]
cmp byte [eax + 0x57], 0
je 0x5095ba
mov eax, 0x5c5900
jmp 0x5095cb
test ebx, ebx
lea eax, [edx - 1]
cmovns eax, ebx
lea ecx, [eax + eax*4]
mov eax, dword [esi + 0x70]
lea eax, [eax + ecx*4]
mov dword [eax + 8], edx
mov ebx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
mov ecx, eax
mov edx, dword [esp + 0x2c]
push dword [eax + 0x14]
push 0
push dword [esp + 0x30]
call fcn.00508460
mov ecx, dword [esi + 0xc]
add esp, 0xc
mov edx, dword [esp + 0x18]
not edx
mov eax, dword [ecx + 0x3c]
add eax, dword [ecx + 0x38]
jns 0x50960b
push edx
mov edx, esi
call fcn.00490a40
add esp, 4
jmp 0x509614
mov ecx, dword [ecx + 0x40]
mov eax, dword [esi + 0x74]
mov dword [ecx + edx*4], eax
mov ecx, dword [esi + 0x74]
cmp dword [esi + 0x78], ecx
jg 0x509634
push 0
push ebx
push dword [esp + 0x30]
mov edx, 5
mov ecx, esi
call fcn.00490220
add esp, 0xc
jmp 0x509663
mov edx, dword [esp + 0x28]
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4], 5
mov dword [eax + ecx*4 + 4], edx
mov dword [eax + ecx*4 + 8], ebx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov eax, dword [esi]
lea ecx, [ebx - 1]
mov edx, dword [esi + 0x74]
cmp byte [eax + 0x57], 0
je 0x509678
mov eax, 0x5c5908
jmp 0x50968b
test ecx, ecx
mov eax, edx
cmovns eax, ebx
lea ecx, [eax + eax*4]
mov eax, dword [esi + 0x70]
lea eax, [eax + ecx*4]
add eax, 0xfffffff4
mov dword [eax], edx
lea ecx, [ebx + 1]
mov eax, dword [esi]
mov edx, dword [esi + 0x74]
cmp byte [eax + 0x57], 0
je 0x5096a2
mov eax, 0x5c5900
jmp 0x5096b3
test ecx, ecx
lea eax, [edx - 1]
cmovns eax, ecx
lea ecx, [eax + eax*4]
mov eax, dword [esi + 0x70]
lea eax, [eax + ecx*4]
mov ecx, dword [esp + 0x20]
mov dword [eax + 8], edx
test ecx, ecx
je 0x5096d2
mov al, byte [edi + 0x13]
cmp al, 8
jae 0x5096d2
movzx eax, al
mov dword [edi + eax*4 + 0x98], ecx
inc byte [edi + 0x13]
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x5096ee
mov al, byte [edi + 0x13]
cmp al, 8
jae 0x5096ee
movzx eax, al
mov dword [edi + eax*4 + 0x98], ecx
inc byte [edi + 0x13]
test ebp, ebp
je 0x509752
cmp ebp, 1
jne 0x509731
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x509713
mov al, byte [edi + 0x13]
cmp al, 8
jae 0x509713
movzx eax, al
mov dword [edi + eax*4 + 0x98], ecx
inc byte [edi + 0x13]
mov ecx, dword [esp + 0x24]
test ecx, ecx
je 0x509752
mov al, byte [edi + 0x13]
cmp al, 8
jae 0x509752
movzx eax, al
mov dword [edi + eax*4 + 0x98], ecx
inc byte [edi + 0x13]
jmp 0x509752
mov eax, dword [edi + 0x1c]
cmp ebp, eax
jle 0x509752
mov eax, dword [esp + 0x1c]
mov dword [edi + 0x20], eax
mov eax, ebp
mov dword [edi + 0x1c], ebp
cmp ebp, eax
jle 0x509752
mov eax, dword [esp + 0x24]
mov dword [edi + 0x1c], ebp
mov dword [edi + 0x20], eax
mov ecx, dword [esp + 0x38]
mov edx, 1
call fcn.00508cf0
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret