Function at 0x509708
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffbc
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov byte [ebp - 5], cl
mov ebx, edx
mov dword [ebp - 4], eax
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
xor eax, eax
push ebp
push 0x509ab8
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, esi
xor edx, edx
call fcn.00570ff8
push eax
mov eax, esi
xor edx, edx
call fcn.00570fe4
pop edx
call fcn.005280f0
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
call fcn.0043efec
mov eax, dword [eax + 0xc]
push eax
mov eax, dword [ebp - 0xc]
call fcn.0043efec
mov eax, dword [eax + 0xc]
pop edx
mov ecx, dword [eax]
call dword [ecx + 8]
push 0
mov eax, dword [ebp - 0xc]
call fcn.0043efec
call fcn.00439e30
push eax
call fcn.00409fbc
push 0xffffff
mov eax, dword [ebp - 0xc]
call fcn.0043efec
call fcn.00439e30
push eax
call fcn.00409f6c
mov eax, dword [ebp - 0xc]
mov edx, dword [eax]
call dword [edx + 0x24]
push eax
lea eax, [ebp - 0x3c]
push eax
mov eax, dword [ebp - 0xc]
mov edx, dword [eax]
call dword [edx + 0x30]
mov ecx, eax
xor edx, edx
xor eax, eax
call fcn.004095c8
mov eax, dword [ebp + 0x14]
cmp byte [eax + 8], 0
je 0x5097f5
lea eax, [ebp - 0x3c]
push eax
push edi
mov eax, ebx
call fcn.0040ef64
push eax
mov eax, dword [ebp - 0xc]
call fcn.0043efec
call fcn.00439e30
push eax
lea eax, [ebp - 0x40]
mov edx, ebx
call fcn.004068dc
mov edx, dword [ebp - 0x40]
pop eax
pop ecx
call fcn.0040a13c
jmp 0x50981a
push edi
mov eax, dword [ebp - 0xc]
call fcn.0043efec
call fcn.00439e30
push eax
lea eax, [ebp - 0x44]
mov edx, ebx
call fcn.0040690c
mov edx, dword [ebp - 0x44]
lea ecx, [ebp - 0x3c]
pop eax
call fcn.005235c4
mov eax, dword [ebp - 0xc]
mov edx, dword [eax]
call dword [edx + 0x24]
mov ebx, eax
dec ebx
mov eax, dword [ebp - 0xc]
mov edx, dword [eax]
call dword [edx + 0x30]
dec eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x24]
dec eax
mov edx, dword [esi + 4]
add edx, ebx
cmp eax, edx
jge 0x509851
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x24]
mov ebx, eax
dec ebx
sub ebx, dword [esi + 4]
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x30]
dec eax
mov edx, dword [esi]
add edx, dword [ebp - 0x14]
cmp eax, edx
jge 0x509871
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x30]
dec eax
sub eax, dword [esi]
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 4]
test eax, eax
jge 0x50987c
neg eax
jmp 0x50987e
xor eax, eax
mov edx, dword [esi]
test edx, edx
jge 0x50988b
neg edx
mov dword [ebp - 0x18], edx
jmp 0x509890
xor edx, edx
mov dword [ebp - 0x18], edx
mov byte [ebp - 0x1d], 0xff
mov edx, dword [ebp + 8]
mov dword [ebp - 0x24], edx
cmp byte [ebp - 5], 0
je 0x50999f
sub ebx, eax
jl 0x509a95
inc ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
call fcn.0043f15c
mov ebx, eax
mov edx, dword [esi + 4]
add edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
call fcn.0043f15c
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
sub edx, eax
jl 0x50998e
inc edx
mov dword [ebp - 0x2c], edx
cmp dword [ebx + eax*4], 0xffffff
je 0x509984
cmp dword [ebx + eax*4], 0xffffffff
je 0x509984
mov ecx, dword [esi]
add ecx, eax
mov edi, dword [ebp - 0x1c]
movzx ecx, byte [edi + ecx*4 + 2]
movzx edx, byte [ebp - 0x24]
movzx edi, dl
sub ecx, edi
movzx edi, byte [ebx + eax*4 + 2]
imul ecx, edi
movzx edx, dl
shl edx, 8
add ecx, edx
shr ecx, 8
mov byte [ebp - 0x1e], cl
mov ecx, dword [esi]
add ecx, eax
mov edi, dword [ebp - 0x1c]
movzx ecx, byte [edi + ecx*4 + 1]
movzx edx, byte [ebp - 0x23]
movzx edi, dl
sub ecx, edi
movzx edi, byte [ebx + eax*4 + 1]
imul ecx, edi
movzx edx, dl
shl edx, 8
add ecx, edx
shr ecx, 8
mov byte [ebp - 0x1f], cl
mov edx, dword [esi]
add edx, eax
mov ecx, dword [ebp - 0x1c]
movzx edx, byte [ecx + edx*4]
movzx ecx, byte [ebp - 0x22]
sub edx, ecx
movzx ecx, byte [ebx + eax*4]
imul edx, ecx
movzx ecx, byte [ebp - 0x22]
shl ecx, 8
add edx, ecx
shr edx, 8
mov byte [ebp - 0x20], dl
mov edx, dword [esi]
add edx, eax
mov ecx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x20]
mov dword [ecx + edx*4], edi
inc eax
dec dword [ebp - 0x2c]
jne 0x5098e3
inc dword [ebp - 0x10]
dec dword [ebp - 0x28]
jne 0x5098b3
jmp 0x509a95
sub ebx, eax
jl 0x509a95
inc ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
call fcn.0043f15c
mov ebx, eax
mov edx, dword [esi + 4]
add edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
call fcn.0043f15c
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
sub edx, eax
jl 0x509a89
inc edx
mov dword [ebp - 0x2c], edx
cmp dword [ebx + eax*4], 0xffffff
je 0x509a7f
cmp dword [ebx + eax*4], 0xffffffff
je 0x509a7f
mov ecx, dword [esi]
add ecx, eax
mov edi, dword [ebp - 0x1c]
movzx ecx, byte [edi + ecx*4 + 2]
movzx edx, byte [ebp - 0x24]
movzx edi, dl
sub ecx, edi
movzx edi, byte [ebx + eax*4 + 2]
imul ecx, edi
movzx edx, dl
shl edx, 8
add ecx, edx
shr ecx, 8
mov byte [ebp - 0x1e], cl
mov ecx, dword [esi]
add ecx, eax
mov edi, dword [ebp - 0x1c]
movzx ecx, byte [edi + ecx*4 + 1]
movzx edx, byte [ebp - 0x23]
movzx edi, dl
sub ecx, edi
movzx edi, byte [ebx + eax*4 + 1]
imul ecx, edi
movzx edx, dl
shl edx, 8
add ecx, edx
shr ecx, 8
mov byte [ebp - 0x1f], cl
mov edx, dword [esi]
add edx, eax
mov ecx, dword [ebp - 0x1c]
movzx edx, byte [ecx + edx*4]
movzx ecx, byte [ebp - 0x22]
sub edx, ecx
movzx ecx, byte [ebx + eax*4]
imul edx, ecx
movzx ecx, byte [ebp - 0x22]
shl ecx, 8
add edx, ecx
shr edx, 8
mov byte [ebp - 0x20], dl
mov edx, dword [esi]
add edx, eax
mov ecx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x20]
mov dword [ecx + edx*4], edi
inc eax
dec dword [ebp - 0x2c]
jne 0x5099de
inc dword [ebp - 0x10]
dec dword [ebp - 0x28]
jne 0x5099ae
lea eax, [ebp - 0xc]
call fcn.00415b74
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x509abf
lea eax, [ebp - 0x44]
mov edx, 2
call fcn.00406748
ret