Function at 0x518110
Capabilities:
Inspect section memory permissions

Disassembly:
sub esp, 0xd4
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x2e48]
test eax, eax
je 0x518740
mov eax, dword [esi]
lea ecx, [esp + 0x5c]
push ecx
mov ecx, esi
call dword [eax + 0x24]
mov ebx, dword [eax]
mov ecx, dword [esi + 0x2e48]
mov dword [esp + 0x28], ebx
mov edi, dword [eax + 4]
mov dword [esp + 0x2c], edi
mov edx, dword [eax + 8]
mov dword [esp + 0x30], edx
mov dword [esp + 0x30], ecx
mov edx, dword [eax + 0xc]
mov eax, dword [esp + 0xec]
mov dword [esp + 0x34], edx
cmp dword [eax + 8], ebx
jle 0x518740
cmp dword [eax], ecx
jge 0x518740
cmp dword [eax + 0xc], edi
jle 0x518740
cmp dword [eax + 4], edx
jge 0x518740
mov al, byte [esi + 0x31d5]
test al, al
je 0x518197
mov ebp, dword [esi + 0x31f0]
jmp 0x51819e
mov ebp, dword [esp + 0xe8]
lea edx, [esi + 0x2e20]
mov dword [esp + 0x64], ecx
mov dword [esp + 0x44], ebp
mov dword [esp + 0x5c], ebx
mov ecx, ebx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x58], 3
mov eax, dword [edx - 4]
test eax, eax
jle 0x5186ba
mov ebx, dword [edx - 4]
mov eax, ecx
add ecx, ebx
mov bl, byte [edx - 8]
test bl, bl
mov dword [esp + 0x5c], eax
mov dword [esp + 0x64], ecx
je 0x51820e
mov ebx, dword [edx]
mov edx, dword [ebp]
test ebx, 0xfe000000
je 0x518211
mov ebx, dword [esi + 0x31f4]
push ebx
sub esp, 0x10
mov ebx, esp
mov dword [ebx], eax
mov eax, dword [esp + 0x48]
mov dword [ebx + 4], edi
mov dword [ebx + 8], ecx
mov ecx, ebp
mov dword [ebx + 0xc], eax
call dword [edx + 0x34]
jmp 0x518231
mov edx, dword [ebp]
mov ebx, dword [esi + 0xc74]
push ebx
sub esp, 0x10
mov ebx, esp
mov dword [ebx], eax
mov eax, dword [esp + 0x48]
mov dword [ebx + 4], edi
mov dword [ebx + 8], ecx
mov ecx, ebp
mov dword [ebx + 0xc], eax
call dword [edx + 0x38]
mov ebx, dword [esi + 0x32a0]
lea edi, [esi + 0x332c]
push ebx
mov ecx, edi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], 0
mov byte [esp + 0x16], 0
call fcn.0056d4c0
mov ecx, dword [esi + 0x3378]
push eax
add ecx, 8
call fcn.0052d340
test ah, 0x10
mov dword [esp + 0x14], eax
je 0x5182bc
mov eax, dword [esi + 0x32a0]
mov ecx, edi
push eax
call fcn.0056d4c0
mov edi, eax
mov eax, dword [esp + 0x14]
test edi, edi
jle 0x51829f
test ah, 0x10
je 0x51829f
mov eax, dword [esi + 0x3378]
dec edi
push edi
lea ecx, [eax + 8]
call fcn.0052d340
test edi, edi
jg 0x518286
test ah, 0x20
jne 0x5182bc
mov ecx, dword [esp + 0x14]
and eax, 0xfff
and ecx, 0xfff
cmp ecx, eax
jge 0x5182bc
mov byte [esp + 0x12], 1
push 0x1f
push 0x1a
mov ecx, esi
call fcn.005180f0
push 0x1e
push 0x19
mov ecx, esi
mov dword [esp + 0x84], eax
call fcn.005180f0
lea edi, [esi + 0x332c]
mov dword [esp + 0x40], eax
mov ecx, edi
call fcn.0056d460
cmp ebx, eax
jge 0x5186aa
jmp 0x5182f8
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x24]
cmp eax, ecx
jge 0x5186aa
push ebx
mov ecx, edi
call fcn.0056d4c0
mov ebx, eax
mov ecx, edi
push ebx
mov dword [esp + 0x3c], ebx
call fcn.0056d480
mov edx, dword [esp + 0x20]
push ebx
cmp edx, eax
mov eax, dword [esi + 0x3378]
sete byte [esp + 0x17]
lea ecx, [eax + 8]
call fcn.0052d340
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x3378]
lea ecx, [ebx + 1]
push ecx
lea ecx, [eax + 8]
call fcn.0052d340
mov dword [esp + 0x3c], eax
mov eax, dword [esi + 0x3378]
push ebx
lea ecx, [eax + 8]
call fcn.0052caa0
mov ebx, eax
mov al, byte [esp + 0x13]
test al, al
jne 0x51836d
xor ebx, ebx
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x14]
mov ecx, edx
and eax, 0xfff
and ecx, 0xfff
mov dword [esp + 0x18], eax
test byte [esp + 0x15], 0x20
je 0x518419
mov al, byte [esp + 0x13]
test al, al
je 0x518409
mov edx, dword [esp + 0x38]
mov ecx, edi
push edx
call fcn.0056d900
test al, al
mov eax, dword [esp + 0x18]
je 0x5183db
cmp eax, 0x400
jne 0x5183c4
or ebx, 0x80000000
mov byte [esp + 0x12], 0
jmp 0x5184ab
mov ecx, dword [esp + 0x7c]
mov eax, 1
shl eax, cl
mov byte [esp + 0x12], 0
or ebx, eax
jmp 0x5184ab
cmp eax, 0x400
jne 0x5183f2
or ebx, 0x40000000
mov byte [esp + 0x12], 0
jmp 0x5184ab
mov ecx, dword [esp + 0x40]
mov edx, 1
shl edx, cl
mov byte [esp + 0x12], 0
or ebx, edx
jmp 0x5184ab
or ebx, 0x20000000
mov byte [esp + 0x12], 0
jmp 0x5184ab
test dword [esp + 0x14], 0x1000
je 0x51846b
cmp byte [esp + 0x12], 0
je 0x518450
test dh, 0x10
jne 0x5184a5
cmp eax, 0x400
jle 0x518443
or ebx, 0x8000000
mov byte [esp + 0x12], 0
jmp 0x5184ab
or ebx, 0x10000000
mov byte [esp + 0x12], 0
jmp 0x5184ab
cmp eax, 0x400
jle 0x5184ab
cmp ecx, eax
jge 0x5184a5
cmp ecx, 0x400
jle 0x51849d
or ebx, 0x8000000
jmp 0x5184ab
cmp eax, 0x400
jle 0x5184ab
cmp ecx, eax
jge 0x5184a5
test dh, 0x10
mov byte [esp + 0x12], 0
je 0x51848d
or ebx, 0x20000000
mov byte [esp + 0x12], 1
jmp 0x5184ab
cmp ecx, 0x400
jle 0x51849d
or ebx, 0x8000000
jmp 0x5184ab
or ebx, 0x10000000
jmp 0x5184ab
or ebx, 0x20000000
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x64]
mov dword [esp + 0x50], edx
mov edx, dword [esp + 0x24]
mov eax, dword [ecx]
and ebx, eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x54], eax
mov eax, dword [esi + 0x2d78]
mov dword [esp + 0x4c], edx
add eax, edx
mov dl, byte [ecx - 8]
mov dword [esp + 0x54], eax
test dl, dl
jne 0x51863e
mov cl, byte [esp + 0x13]
mov byte [esp + 0x80], 0
test cl, cl
je 0x518521
mov eax, dword [esp + 0x38]
lea ecx, [esp + 0x80]
inc eax
push eax
push 0x7fd26c
push ecx
call fcn.0058757f
mov eax, dword [esp + 0x60]
add esp, 0xc
test byte [esi + 0x3328], 0x40
je 0x518584
mov eax, dword [esi + 0x3378]
mov edx, dword [esp + 0x38]
push edx
lea ecx, [eax + 8]
call fcn.0052d340
mov ecx, eax
mov edx, eax
sar ecx, 0x10
push ecx
mov ecx, eax
shr ecx, 9
not cl
and ecx, 8
and eax, 0x2000
and edx, 0xfff
or ecx, 0x57
neg eax
sbb al, al
push edx
and al, 0xe9
push ecx
add al, 0x5f
movsx edx, al
push edx
lea eax, [esp + 0x90]
push str._c_c__03X__03X
push eax
call fcn.0058757f
mov eax, dword [esp + 0x6c]
add esp, 0x18
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x48]
mov edi, dword [ebp]
mov dword [esp + 0x70], edx
mov dword [esp + 0x6c], ecx
mov ecx, dword [esp + 0x50]
lea edx, [esp + 0x80]
mov dword [esp + 0x74], ecx
push edx
mov dword [esp + 0x7c], eax
call fcn.00518750
add esp, 4
mov ecx, ebp
push eax
lea eax, [esp + 0x84]
push eax
lea eax, [esi + 0xc94]
push eax
call dword [edi + 0x58]
mov edi, dword [esp + 0x74]
mov ecx, dword [esi + 0xc74]
mov edx, dword [esi + 0xc6c]
mov ebp, dword [ebp]
sub edi, eax
push ecx
lea eax, [esp + 0x84]
push edx
push eax
sub edi, 3
call fcn.00518750
mov edx, dword [esi + 0x2d7c]
add esp, 4
lea ecx, [esp + 0x88]
mov dword [esp + 0x44], ebp
push eax
mov eax, dword [esp + 0x7c]
push ecx
add edx, eax
lea ecx, [esi + 0xc94]
push edx
push ecx
mov edx, dword [esp + 0x8c]
sub esp, 0x10
mov ebp, dword [esp + 0x6c]
mov ecx, esp
mov dword [ecx], edi
mov dword [ecx + 4], eax
mov eax, dword [esp + 0xa0]
mov dword [ecx + 8], edx
mov edx, dword [esp + 0x64]
mov dword [ecx + 0xc], eax
mov ecx, ebp
call dword [edx + 0x48]
test ebx, ebx
je 0x51867c
lea ecx, [esi + 0x2a18]
xor edi, edi
mov dword [esp + 0x18], ecx
test ebx, ebx
je 0x51867c
test bl, 1
je 0x518669
lea eax, [esi + 0xc94]
lea edx, [esp + 0x48]
push eax
push edx
push ebp
call fcn.0056ec80
mov ecx, dword [esp + 0x18]
sar ebx, 1
inc edi
add ecx, 0x18
cmp edi, 0x20
mov dword [esp + 0x18], ecx
jl 0x51864e
mov ebx, dword [esp + 0x20]
mov eax, dword [esi + 0x2d78]
mov edx, dword [esp + 0x24]
lea edi, [esi + 0x332c]
inc ebx
add edx, eax
mov ecx, edi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], edx
call fcn.0056d460
cmp ebx, eax
jl 0x5182f4
mov edx, dword [esp + 0x1c]
mov edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x64]
mov ebx, dword [esp + 0x28]
mov eax, dword [esp + 0x58]
add edx, 0x10
dec eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x58], eax
jne 0x5181be
mov eax, dword [esi + 0xc24]
mov edx, dword [ebp]
push eax
mov dword [esp + 0x44], edx
sub esp, 0x10
mov eax, edi
mov edx, esp
mov dword [esp + 0x70], ebx
mov dword [edx], ecx
mov ecx, ebp
mov dword [edx + 4], eax
mov eax, dword [esp + 0x44]
mov dword [edx + 8], eax
mov eax, dword [esp + 0x48]
mov dword [edx + 0xc], eax
mov edx, dword [esp + 0x54]
call dword [edx + 0x38]
mov al, byte [esi + 0x31d5]
test al, al
je 0x518740
mov esi, dword [esi + 0x31f0]
xor edx, edx
xor eax, eax
push esi
push edx
push eax
sub esp, 0x10
mov ecx, dword [esp + 0x104]
mov edx, dword [esp + 0x4c]
mov eax, esp
mov ebp, dword [ecx]
mov dword [eax], ebx
mov dword [eax + 4], edi
mov dword [eax + 8], edx
mov edx, dword [esp + 0x50]
mov dword [eax + 0xc], edx
call dword [ebp + 0x44]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd4
ret 8