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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
push ebx
mov ebx, ecx
mov dword [esp + 0xc], edx
push esi
push edi
mov dword [esp + 0x24], ebx
mov edi, dword [ebx]
mov dword [esp + 0x2c], edi
mov esi, dword [edi + 8]
test esi, esi
jne 0x509e7d
cmp dword [edi + 0x74], esi
jne 0x509e74
mov eax, dword [edi]
test byte [eax + 0x50], 8
jne 0x509e74
mov byte [edi + 0x17], 1
mov ecx, edi
call fcn.0048fb60
mov esi, eax
mov ecx, dword [ebx + 4]
mov eax, dword [ecx + 0xc]
mov cl, byte [edi + 0x13]
mov dword [esp + 0x28], eax
test cl, cl
jne 0x509e9b
mov ebx, dword [edi + 0x2c]
inc ebx
mov edx, ebx
lea eax, [edx + 1]
mov edx, eax
jmp 0x509ec6
mov edx, dword [edi + 0x2c]
sub cl, 1
movzx eax, cl
mov byte [edi + 0x13], cl
mov ebx, dword [edi + eax*4 + 0x98]
jne 0x509eb7
lea eax, [edx + 1]
mov edx, eax
jmp 0x509ec6
dec cl
movzx eax, cl
mov byte [edi + 0x13], cl
mov eax, dword [edi + eax*4 + 0x98]
dec dword [edi + 0x38]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x10], eax
lea eax, [edx + 1]
mov edx, dword [ebp + 8]
mov dword [esp + 0x1c], eax
mov dword [edi + 0x2c], eax
mov eax, 0x6a
mov dword [esp + 0x18], eax
mov eax, dword [edi + 0x38]
push ebx
mov dword [esp + 0x24], eax
call fcn.00507ee0
mov edx, dword [ebp + 0x10]
add esp, 4
mov ecx, dword [esp + 0x24]
push dword [esp + 0x10]
call fcn.00507ee0
mov ecx, dword [esp + 0x2c]
add esp, 4
mov cl, byte [ecx + 0x10]
test cl, 1
je 0x509f45
mov edx, dword [esp + 0x14]
cmp edx, 0x36
je 0x509f34
xor eax, eax
cmp edx, 0x39
setne al
lea eax, [eax*2 + 0x37]
mov dword [esp + 0x14], eax
jmp 0x509f3c
mov dword [esp + 0x14], 0x38
mov eax, 0x6b
mov dword [esp + 0x18], eax
test cl, 2
je 0x50a18b
mov ecx, dword [esi + 0x74]
mov dword [esp + 0x24], ecx
cmp dword [esi + 0x78], ecx
jg 0x509f74
push 0
push 0
push ebx
mov edx, 0x33
mov ecx, esi
call fcn.0048fdb0
add esp, 0xc
mov dword [esp + 0x24], eax
jmp 0x509fa3
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4], 0x33
mov dword [eax + ecx*4 + 4], ebx
mov dword [eax + ecx*4 + 8], 0
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov edx, dword [esp + 0x14]
sub edx, 0x36
je 0x50a033
sub edx, 1
je 0x509ffc
sub edx, 2
jne 0x50a087
mov ecx, dword [esi + 0x74]
cmp dword [esi + 0x78], ecx
jg 0x509fdf
push edx
push dword [ebp + 0x14]
mov ecx, esi
push edx
mov edx, 0xb
call fcn.0048fdb0
add esp, 0xc
jmp 0x50a087
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
jmp 0x50a070
mov ecx, dword [esi + 0x74]
cmp dword [esi + 0x78], ecx
jg 0x50a01e
push 0
push dword [ebp + 0x14]
mov edx, 0x32
mov ecx, esi
push dword [esp + 0x18]
call fcn.0048fdb0
add esp, 0xc
jmp 0x50a087
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4], 0x32
jmp 0x50a068
mov ecx, dword [esi + 0x74]
cmp dword [esi + 0x78], ecx
jg 0x50a055
push 0
push dword [ebp + 0x14]
mov edx, 0x33
mov ecx, esi
push dword [esp + 0x18]
call fcn.0048fdb0
add esp, 0xc
jmp 0x50a087
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4], 0x33
mov edx, dword [esp + 0x10]
mov dword [eax + ecx*4 + 4], edx
mov edx, dword [ebp + 0x14]
mov dword [eax + ecx*4 + 0x10], 0
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 8], edx
mov ecx, dword [esi + 0x74]
cmp dword [esi + 0x78], ecx
jg 0x50a0a8
push 0
push dword [esp + 0x24]
mov edx, 0xb
mov ecx, esi
push 0
call fcn.0048fdb0
add esp, 0xc
jmp 0x50a0db
mov edx, dword [esp + 0x20]
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
mov eax, dword [esi]
mov edx, dword [esi + 0x74]
cmp byte [eax + 0x57], 0
je 0x50a0ed
mov eax, 0x5c4868
jmp 0x50a102
mov ecx, dword [esp + 0x24]
lea eax, [edx - 1]
test ecx, ecx
cmovns eax, ecx
lea ecx, [eax + eax*4]
mov eax, dword [esi + 0x70]
lea eax, [eax + ecx*4]
mov dword [eax + 8], edx
mov ecx, dword [esi + 0x74]
cmp dword [esi + 0x78], ecx
jg 0x50a127
push 0
push dword [ebp + 0x14]
mov edx, 0x32
mov ecx, esi
push dword [esp + 0x18]
call fcn.0048fdb0
add esp, 0xc
jmp 0x50a159
mov edx, dword [esp + 0x10]
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 [ebp + 0x14]
mov dword [eax + ecx*4], 0x32
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 + 0x14]
cmp eax, 0x36
je 0x50a167
cmp eax, 0x39
jne 0x50a18b
mov eax, dword [esi]
mov ecx, dword [esi + 0x74]
cmp byte [eax + 0x57], 0
je 0x50a179
mov eax, 0x5c4870
jmp 0x50a185
mov eax, dword [esi + 0x70]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
add eax, 0xfffffff4
mov ecx, dword [esp + 0x20]
mov dword [eax], ecx
mov edx, dword [esi + 0x74]
cmp dword [esi + 0x78], edx
jg 0x50a1ae
push 0
push dword [esp + 0x20]
mov edx, 0x75
mov ecx, esi
push 0
call fcn.0048fdb0
add esp, 0xc
mov edx, eax
jmp 0x50a1e5
mov edi, dword [esp + 0x1c]
lea eax, [edx + 1]
mov dword [esi + 0x74], eax
lea ecx, [edx + edx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4 + 8], edi
mov edi, dword [esp + 0x2c]
mov dword [eax + ecx*4], 0x75
mov dword [eax + ecx*4 + 4], 0
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov ecx, dword [esi]
cmp byte [ecx + 0x57], 0
je 0x50a1ff
push 0x58ac88
or edx, 0xffffffff
call fcn.004908c0
add esp, 4
jmp 0x50a237
test edx, edx
jns 0x50a207
mov edx, dword [esi + 0x74]
dec edx
mov eax, dword [esi + 0x70]
lea ecx, [edx + edx*4]
cmp byte [eax + ecx*4 + 1], 0
lea eax, [eax + ecx*4]
je 0x50a22c
push 0xffffffffffffffff
push 0x58ac88
mov edx, eax
mov ecx, esi
call fcn.00490b10
add esp, 8
jmp 0x50a237
mov dword [eax + 0x10], 0x58ac88
mov byte [eax + 1], 0xff
mov ecx, dword [esi + 0x74]
mov dword [esp + 0x24], ecx
cmp dword [esi + 0x78], ecx
jg 0x50a25f
push ebx
push 0
push dword [esp + 0x24]
mov edx, 0x39
mov ecx, esi
call fcn.0048fdb0
add esp, 0xc
mov dword [esp + 0x24], eax
jmp 0x50a28e
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], 0x39
mov dword [eax + ecx*4 + 4], edx
mov dword [eax + ecx*4 + 8], 0
mov dword [eax + ecx*4 + 0xc], ebx
mov dword [eax + ecx*4 + 0x10], 0
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
cmp edx, 0x39
jne 0x50a2a0
cmp eax, 0x6a
je 0x50a2aa
cmp edx, 0x37
jne 0x50a2fc
cmp eax, 0x6b
jne 0x50a2fc
mov ecx, dword [esi + 0x74]
cmp dword [esi + 0x78], ecx
jg 0x50a2c6
push ebx
push dword [ebp + 0x14]
mov ecx, esi
push dword [esp + 0x18]
call fcn.0048fdb0
add esp, 0xc
jmp 0x50a2fc
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov byte [eax + ecx*4], dl
xor edx, edx
mov word [eax + ecx*4 + 2], dx
mov edx, dword [esp + 0x10]
mov dword [eax + ecx*4 + 4], edx
mov edx, dword [ebp + 0x14]
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], ebx
mov dword [eax + ecx*4 + 0x10], 0
mov byte [eax + ecx*4 + 1], 0
mov ecx, dword [esi + 0x74]
cmp dword [esi + 0x78], ecx
jg 0x50a319
mov edx, dword [esp + 0x18]
mov ecx, esi
push ebx
push ebx
push dword [ebp + 0xc]
call fcn.0048fdb0
add esp, 0xc
jmp 0x50a34e
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4 + 8], ebx
mov dword [eax + ecx*4 + 0xc], ebx
mov dword [eax + ecx*4 + 0x10], 0
lea ecx, [eax + ecx*4]
mov eax, dword [esp + 0x18]
mov byte [ecx + 1], 0
mov byte [ecx], al
xor eax, eax
mov word [ecx + 2], ax
mov eax, dword [ebp + 0xc]
mov dword [ecx + 4], eax
mov eax, dword [esi]
mov edx, dword [esi + 0x74]
cmp byte [eax + 0x57], 0
je 0x50a360
mov eax, 0x5c4868
jmp 0x50a375
mov ecx, dword [esp + 0x24]
lea eax, [edx - 1]
test ecx, ecx
cmovns eax, ecx
lea ecx, [eax + eax*4]
mov eax, dword [esi + 0x70]
lea eax, [eax + ecx*4]
mov dword [eax + 8], edx
mov ecx, dword [esi + 0x74]
mov edx, dword [esp + 0x14]
cmp dword [esi + 0x78], ecx
jg 0x50a398
push ebx
push dword [ebp + 0x14]
mov ecx, esi
push dword [esp + 0x18]
call fcn.0048fdb0
add esp, 0xc
jmp 0x50a3ce
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov byte [eax + ecx*4], dl
xor edx, edx
mov word [eax + ecx*4 + 2], dx
mov edx, dword [esp + 0x10]
mov dword [eax + ecx*4 + 4], edx
mov edx, dword [ebp + 0x14]
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], ebx
mov dword [eax + ecx*4 + 0x10], 0
mov byte [eax + ecx*4 + 1], 0
mov eax, dword [esp + 0x28]
mov ecx, edi
mov edx, dword [eax + 8]
call fcn.004a69f0
mov edx, eax
test edx, edx
jne 0x50a3e7
mov eax, dword [edi]
mov edx, dword [eax + 8]
mov ecx, dword [esi]
cmp byte [ecx + 0x57], 0
je 0x50a3ff
push edx
mov edx, 0xfffffffe
call fcn.004908c0
add esp, 4
jmp 0x50a411
mov eax, dword [esi + 0x74]
lea ecx, [eax + eax*4]
mov eax, dword [esi + 0x70]
mov byte [eax + ecx*4 - 0x13], 0xfe
mov dword [eax + ecx*4 - 4], edx
mov eax, dword [esi + 0x74]
test eax, eax
jle 0x50a428
lea ecx, [eax + eax*4]
mov edx, 0x80
mov eax, dword [esi + 0x70]
mov word [eax + ecx*4 - 0x12], dx
mov ecx, dword [esi + 0xc]
mov edx, dword [esp + 0x20]
not edx
mov eax, dword [ecx + 0x3c]
add eax, dword [ecx + 0x38]
jns 0x50a446
push edx
mov edx, esi
call fcn.004905d0
add esp, 4
jmp 0x50a44f
mov ecx, dword [ecx + 0x40]
mov eax, dword [esi + 0x74]
mov dword [ecx + edx*4], eax
test ebx, ebx
je 0x50a467
mov al, byte [edi + 0x13]
cmp al, 8
jae 0x50a467
movzx eax, al
mov dword [edi + eax*4 + 0x98], ebx
inc byte [edi + 0x13]
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x50a483
mov al, byte [edi + 0x13]
cmp al, 8
jae 0x50a483
movzx eax, al
mov dword [edi + eax*4 + 0x98], ecx
inc byte [edi + 0x13]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret